Explorar o código

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

heqinwei %!s(int64=7) %!d(string=hai) anos
pai
achega
59b7c85eb0
Modificáronse 51 ficheiros con 539 adicións e 97 borrados
  1. 2 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/WarehouseController.java
  3. 5 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java
  4. 6 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/WarehouseMapper.java
  5. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/WarehouseService.java
  6. 12 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  7. 48 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java
  8. 10 0
      applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml
  9. 12 0
      applications/document/document-server/src/main/resources/mapper/WarehouseMapper.xml
  10. 1 2
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  11. 2 2
      applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml
  12. 3 0
      applications/sale/sale-server/src/main/resources/mapper/SaledetailMapper.xml
  13. 2 1
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  14. 2 1
      frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js
  15. 2 1
      frontend/saas-web/app/view/core/form/FormPanel.js
  16. 8 8
      frontend/saas-web/app/view/core/form/FormPanelController.js
  17. 5 3
      frontend/saas-web/app/view/document/bom/FormController.js
  18. 2 3
      frontend/saas-web/app/view/document/customer/FormPanel.js
  19. 14 3
      frontend/saas-web/app/view/document/kind/Kind.js
  20. 1 5
      frontend/saas-web/app/view/document/kind/KindController.js
  21. 17 6
      frontend/saas-web/app/view/document/product/BasePanel.js
  22. 2 0
      frontend/saas-web/app/view/money/fundtransfer/FormPanelController.js
  23. 6 3
      frontend/saas-web/app/view/money/othreceipts/FormPanelController.js
  24. 6 3
      frontend/saas-web/app/view/money/othspendings/FormPanelController.js
  25. 43 5
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  26. 20 10
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  27. 4 1
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  28. 2 1
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  29. 1 4
      frontend/saas-web/app/view/purchase/purchase/QueryPanelModel.js
  30. 5 2
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  31. 6 2
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  32. 8 3
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  33. 8 3
      frontend/saas-web/app/view/sale/saleIn/FormPanelController.js
  34. 6 3
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  35. 12 5
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js
  36. 4 0
      frontend/saas-web/app/view/stock/make/FormPanelController.js
  37. 10 5
      frontend/saas-web/app/view/stock/otherIn/FormPanelController.js
  38. 12 5
      frontend/saas-web/app/view/stock/otherOut/FormPanelController.js
  39. 57 0
      frontend/saas-web/app/view/sys/power/FormPanel.js
  40. 66 0
      frontend/saas-web/app/view/sys/power/FormPanelController.js
  41. 5 0
      frontend/saas-web/app/view/sys/power/FormPanelModel.js
  42. 41 0
      frontend/saas-web/app/view/sys/power/TreeGrid.js
  43. 35 0
      frontend/saas-web/app/view/sys/power/TreePanel.js
  44. 1 0
      frontend/saas-web/overrides/i18n.js
  45. BIN=BIN
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.eot
  46. 0 0
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.js
  47. 5 2
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.svg
  48. BIN=BIN
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.ttf
  49. BIN=BIN
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.woff
  50. 2 1
      frontend/saas-web/packages/font-saas/sass/etc/icons.scss
  51. 8 1
      frontend/saas-web/resources/json/navigation.json

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

@@ -31,6 +31,8 @@ public enum BizExceptionCode implements BaseExceptionCode {
     REPEAT_NAME(79501, "名称重复"),
     NO_DATA(79998, "未找到数据"),
     ILLEGAL_ID(79999, "id不正确"),
+    PRODUCT_HAS_WAREHOUSE(79502, "存在物料默认仓库资料为该仓库资料,无法删除"),
+    PRODUCTWH_HAS_WAREHOUSE(79503, "该仓库资料存在库存,无法删除"),
 
 
 

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

@@ -107,7 +107,7 @@ public class WarehouseController {
      */
     @PostMapping("/delete/{id}")
     public Result delete(@PathVariable("id") Long id){
-        warehouseService.removeByPrimaryKey(id);
+        warehouseService.delete(id);
         return Result.success();
     }
 

+ 5 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java

@@ -21,4 +21,9 @@ public interface CustomerMapper extends CommonBaseMapper<Customer> {
 
     Integer validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id,
                                    @Param("companyId") Long companyId);
+
+    int validNameAndCodeWhenInsert(Customer record);
+
+    int validNameAndCodeWhenUpdate(Customer record);
+
 }

+ 6 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/WarehouseMapper.java

@@ -34,4 +34,10 @@ public interface WarehouseMapper extends CommonBaseMapper<Warehouse> {
     List<Warehouse> selectWarehouseListByCondition(@Param("con") String con,@Param("companyId") Long companyId);
 
     int selectCountByName(@Param("name") String name, @Param("companyId") Long companyId, @Param("id") Long id);
+
+    String selectCodeById(Long id);
+
+    Integer deleteCheckProduct(@Param("id") Long id, @Param("companyId") Long companyId);
+
+    Integer deleteCheckWH(@Param("id") Long id, @Param("companyId") Long companyId);
 }

+ 9 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/WarehouseService.java

@@ -44,4 +44,13 @@ public interface WarehouseService extends CommonBaseService<WarehouseMapper, War
      * @return
      */
     boolean batchDelete(BatchDealBaseDTO baseDTOs);
+
+    /**
+    * @Description 刪除
+    * @Param: [id]
+    * @return: void
+    * @Author: guq
+    * @Date: 2018/11/8
+    */
+    void delete(Long id);
 }

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

@@ -133,6 +133,11 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         //单号赋值
         customer.setCu_code(cu_code);
         if (StringUtils.isEmpty(cu_id) || "0".equals(cu_id.toString())) {
+            //检查名称和编号
+            int count = getMapper().validNameAndCodeWhenInsert(customer);
+            if (count>0) {
+                throw new BizException(500, "客户名称或编号重复");
+            }
             //插入操作
             getMapper().insertSelective(customer);
             cu_id = customer.getId();
@@ -167,6 +172,12 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             messageLogService.save(baseDTO);
             return baseDTO;
         }
+        //检查名称和编号
+        int count = getMapper().validNameAndCodeWhenUpdate(customer);
+        if (count>0) {
+            throw new BizException(500, "客户名称或编号重复");
+        }
+
         //更新操作
         getMapper().updateByPrimaryKeySelective(customer);
         //添加从表传输对象
@@ -216,7 +227,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
 
         baseDTO = getBaseDTOById(cu_id);
         //日志记录
-            messageLogService.save(baseDTO);
+        messageLogService.save(baseDTO);
         return baseDTO;
     }
 

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

@@ -19,6 +19,7 @@ import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Date;
 import java.util.HashMap;
@@ -32,6 +33,8 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
     private MessageLogService messageLogService;
     @Autowired
     private MaxnumberService maxnumberService;
+    @Autowired
+    private WarehouseMapper warehouseMapper;
 
     @Override
     public PageInfo<Warehouse> getListData(PageRequest page, ListReqDTO req) {
@@ -195,11 +198,55 @@ public class WarehouseServiceImpl extends CommonBaseServiceImpl<WarehouseMapper,
             return false;
         }
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
-            getMapper().deleteByPrimaryKey(base.getId());
+            delete(base.getId());
         }
         return true;
     }
 
+    @Override
+    public void delete(Long id) {
+        //删除前检测物料是否存在默认仓库
+        Long companyId = BaseContextHolder.getCompanyId();
+        companyId = 1l;
+        Integer num = 0;
+        num = warehouseMapper.deleteCheckProduct(id, companyId);
+        if (num > 0) {
+            throw new BizException(BizExceptionCode.PRODUCT_HAS_WAREHOUSE);
+        }
+        //检测是否存在库存
+        num = warehouseMapper.deleteCheckWH(id, companyId);
+        if (num > 0) {
+            throw new BizException(BizExceptionCode.PRODUCTWH_HAS_WAREHOUSE);
+        }
+        singleDelete(id);
+    }
+
+    private void singleDelete(Long id) {
+        if (null != id) {
+            //主表删除
+            getMapper().deleteByPrimaryKey(id);
+            DocBaseDTO docBaseDTO = getBaseDTOById(id);
+            //日志
+            messageLogService.delete(docBaseDTO);
+        }
+    }
+
+    /**
+     * @Description
+     * @Param: [id]
+     * @return: com.usoftchina.saas.commons.dto.DocBaseDTO
+     * @Author: guq
+     * @Date: 2018/10/22
+     */
+    private DocBaseDTO getBaseDTOById(Long id) {
+        if (null == id) {
+            return null;
+        }
+        String code = warehouseMapper.selectCodeById(id);
+        DocBaseDTO baseDTO = new DocBaseDTO(id, code, BillCodeSeq.WAREHOUSE.getCaller());
+        return baseDTO;
+    }
+
     /**
      * 构造 记录日志对象
      * @param id

+ 10 - 0
applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml

@@ -359,6 +359,16 @@
     select count(1) from customer where cu_code = #{code} and cu_id != #{id} and companyId =#{companyId}
   </select>
 
+  <select id="validNameAndCodeWhenInsert" parameterType="com.usoftchina.saas.document.entities.Customer" resultType="int">
+    select count(1) from customer where cu_code = #{cu_code,jdbcType=VARCHAR} or cu_name = #{cu_name,jdbcType=VARCHAR}
+  </select>
+
+  <select id="validNameAndCodeWhenUpdate" parameterType="com.usoftchina.saas.document.entities.Customer" resultType="int">
+    select count(1) from customer where cu_code = #{cu_code,jdbcType=VARCHAR} or cu_name = #{cu_name,jdbcType=VARCHAR}
+    and cu_id != #{id}
+  </select>
+
+
   <select id="selectCodeById" parameterType="java.lang.Long" resultType="string">
     select
     cu_code

+ 12 - 0
applications/document/document-server/src/main/resources/mapper/WarehouseMapper.xml

@@ -344,5 +344,17 @@
         </where>
     </select>
 
+    <select id="selectCodeById" resultType="string" parameterType="long">
+        select wh_code from warehouse where wh_id=#{id}
+    </select>
+
+    <select id="deleteCheckProduct" resultType="integer">
+        select count(1) from product where pr_whid = #{id} and companyId = #{companyId}
+    </select>
+
+    <select id="deleteCheckWH" resultType="integer">
+        select count(1) from productwh where pw_whid = #{id} and pw_onhand > 0
+        and companyId = #{companyId}
+    </select>
 </mapper>
 

+ 1 - 2
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -278,7 +278,7 @@ public class SaleServiceImpl implements SaleService{
         }
         //检测出货状态为未出货
         Integer num = saleMapper.checkSendStatus(id);
-        if (num == 0) {
+        if (num > 0) {
             throw new BizException(BizExceptionCode.SALEOUT_UNAUDIT_ERROR);
         }
         singleUnAudit(id);
@@ -478,7 +478,6 @@ public class SaleServiceImpl implements SaleService{
             //更新已转数
             saleDetail.setSd_yqty(saleDetail.getSd_qty());
             saledetailMapper.updateByPrimaryKeySelective(saleDetail);
-
         }
         //更新存在字段
         saleMapper.updateByPrimaryKeySelective(sale);

+ 2 - 2
applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml

@@ -385,7 +385,7 @@
   </update>
 
   <select id="checkSendStatus" parameterType="long" resultType="java.lang.Integer">
-    select count(1) from sale where sa_id = #{id}
-    and ifnull(sa_sendstatuscode,'UNTURNOUT') = 'UNTURNOUT';
+    select count(1) from saledetail where sd_said = #{id}
+    and ifnull(sd_yqty, 0) > 0;
   </select>
 </mapper>

+ 3 - 0
applications/sale/sale-server/src/main/resources/mapper/SaledetailMapper.xml

@@ -254,6 +254,9 @@
       <if test="sd_qty != null" >
         sd_qty = #{sd_qty,jdbcType=DOUBLE},
       </if>
+      <if test="sd_yqty != null" >
+        sd_yqty = #{sd_yqty,jdbcType=DOUBLE},
+      </if>
       <if test="sd_price != null" >
         sd_price = #{sd_price,jdbcType=DOUBLE},
       </if>

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

@@ -229,7 +229,8 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
                             var rec = me.column.ownerCt.ownerCt.selModel.getLastSelected();
                             var nowRec = me.column.ownerCt.ownerCt.store.getData().getByKey(rec.id);
                             if(nowRec.get(item.to)&&nowRec.get(item.to)!=""){
-                                nowRec.set(item.to,'');
+                                nowRec.set(item.to,null);
+                                delete nowRec.modified[item.to];
                             }
                             if(me.name==item.to){
                                 me.column.getEditor().setValue('');

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

@@ -223,7 +223,8 @@ Ext.define('saas.view.core.dbfind.MultiDbfindTrigger', {
                             var rec = me.column.ownerCt.ownerCt.selModel.getLastSelected();
                             var nowRec = me.column.ownerCt.ownerCt.store.getData().getByKey(rec.id);
                             if(nowRec.get(item.to)&&nowRec.get(item.to)!=""){
-                                nowRec.set(item.to,'');
+                                nowRec.set(item.to,null);
+                                delete nowRec.modified[item.to];
                             }
                             if(me.name==item.to){
                                 me.column.getEditor().setValue('');

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

@@ -29,7 +29,6 @@ Ext.define('saas.view.core.form.FormPanel', {
         labelAlign: 'right',
         labelWidth: 90,
         columnWidth: 0.25,
-        blankText: '该字段不能为空'
     },
 
     items: [],
@@ -38,6 +37,8 @@ Ext.define('saas.view.core.form.FormPanel', {
     toolBtns: [], // 自定义按钮
     codeInHeader: true, // 单据编号显示在toolbar
     closeConfirm: true, // 关闭确认
+    invalidText: '表单校验有误,请检查', // 校验未通过提示内容
+    dirtyAuditText: '表单数据有修改,是否先保存修改?', // 有修改时点击审核提示内容
 
     auditTexts: {
         auditCode: 'AUDITED',

+ 8 - 8
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -57,23 +57,23 @@ Ext.define('saas.view.core.form.FormPanelController', {
 
         var valid = form.isValid();
         if(!valid) {
-            showToast('表单校验有误,请检查');
+            showToast(form.invalidText);
             return false;
         }
 
-        //form里面数据
-        var formData = form.getFormData();
-        
-        me.save(formData);
+        me.save();
     },
 
-    save:function(formData){
+    save:function(){
         var me = this,
         form = this.getView(),
         detailCount = form.detailCount,
         viewModel = me.getViewModel(),
         modelData = viewModel.getData();
 
+        //form里面数据
+        var formData = form.getFormData();
+
         var params = {
             main:formData.main
         };
@@ -126,7 +126,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
         var dirty = form.isDirty();
 
         if(dirty) {
-            showConfirm('提示', '表单数据有修改,是否先保存修改?')
+            showConfirm('提示', form.dirtyAuditText)
             .then(function(yes) {
                 if(yes == 'yes') {
                     me.onSave();
@@ -138,7 +138,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
         var valid = form.isValid();
 
         if(!valid) {
-            showToast('表单校验有误,请检查');
+            showToast(form.invalidText);
             return false;
         }
         

+ 5 - 3
frontend/saas-web/app/view/document/bom/FormController.js

@@ -14,8 +14,7 @@ Ext.define('saas.view.document.bom.FormController', {
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         //放大镜赋值设置
-                        dbfinds:[
-   {
+                        dbfinds:[{
                             from:'pr_code',to:'bd_soncode'                          
                         },{
                             from:'pr_detail',to:'pr_detail'
@@ -67,6 +66,7 @@ Ext.define('saas.view.document.bom.FormController', {
                             "text": "最新采购单价",
                             "dataIndex": "pr_purcprice",
                             "width": 0,
+                            align:'right'
                         },{
                             "text": "仓库id",
                             "dataIndex": "pr_whid",
@@ -76,13 +76,14 @@ Ext.define('saas.view.document.bom.FormController', {
                             "dataIndex": "pr_whcode",
                             "hidden": true,
                         },{
-                            "text": "仓库",
+                            "text": "仓库名称",
                             "dataIndex": "pr_whname",
                             "width": 200,
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",
@@ -103,6 +104,7 @@ Ext.define('saas.view.document.bom.FormController', {
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",

+ 2 - 3
frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -313,7 +313,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 xtype : "",
                 renderer: function (v, m, r) {
                     if(v=='0'){
-                        return '';
+                        return '';
                     }else if(v=='1'){
                         return '是';
                     }
@@ -372,7 +372,6 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 items : null   
             },
             {
-                allowBlank:false,
                 editor : {
                     displayField : "display", 
                     format : "", 
@@ -410,7 +409,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 xtype : "",
                 renderer: function (v, m, r) {
                     if(v=='0'){
-                        return '';
+                        return '';
                     }else if(v=='1'){
                         return '是';
                     }

+ 14 - 3
frontend/saas-web/app/view/document/kind/Kind.js

@@ -24,18 +24,22 @@ Ext.define('saas.view.document.kind.Kind', {
         name : 'segmentedbutton',
         bind:'{segmented}',
         items: [{
+            name:'customerkind',
             text: '客户',
             value: 'customerkind',
             typeText:'客户类型'
         }, {
+            name:'vendorkind',
             text: '供应商',
             value: 'vendorkind',
             typeText:'供应商类型'
         }, {
+            name:'productkind',
             text: '物料',
             value: 'productkind',
             typeText:'物料类型'
         }, {
+            name:'inoutkind',
             text: '收支',
             value: 'inoutkind',
             typeText:'收支类别'
@@ -228,14 +232,13 @@ Ext.define('saas.view.document.kind.Kind', {
                 xtype: 'actioncolumn',
                 align : 'center',
                 items: [{
-                    tooltip: '锁定',
                     iconCls:'',
                     getClass: function(v, meta, rec) {
                         if(rec.get('wh_statuscode')=='OPEN'){
-                            this.items[0].tooltip = '启用';
+                            this.items[0].tooltip = '启用';
                             return 'x-grid-checkcolumn-checked';
                         }else{
-                            this.items[0].tooltip = '启用';
+                            this.items[0].tooltip = '启用';
                             return 'x-grid-checkcolumn';
                         }
                     },
@@ -269,6 +272,14 @@ Ext.define('saas.view.document.kind.Kind', {
         }
     },
     refresh:function(){
+        var me = this;
+        var grid = me.items.items[0];
+        var button = grid.ownerCt.dockedItems.items[0].down('[name='+grid.ownerCt.ownerCt.viewConfig+']');
+        
+        if(button){
+            button.click();
+            me.ownerCt.setTitle(button.typeText + '查询');
+        }
     }
 })
 

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

@@ -15,17 +15,13 @@ Ext.define('saas.view.document.kind.KindController', {
         }else{
             defaultKind=vm.getData()['dataKind'].value  //类别合并界面
         }
-        if(grid.ownerCt._config){
-            defaultKind = grid.ownerCt._config;
-            vm.setData({'dataKind':{'value':grid.ownerCt._config}});
-        }
         var etc = view.etc[defaultKind];
         var store = vm.getStore(defaultKind);
         store.load();
         grid.reconfigure(store, me.insertActionColumn(etc.columns));
     },
     onKindToggle:function(container, button, pressed){
-       var me = this,
+        var me = this,
             name = button.value,
             view = me.getView(),
             grid = me.lookup('document-kind-Grid'),

+ 17 - 6
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -11,22 +11,33 @@ Ext.define('saas.view.document.product.BasePanel', {
         xtype : "remotecombo", 
         storeUrl: '/api/document/producttype/getCombo',
         name : "pr_kind", 
-        emptyText : "请选择物料类型"
-    },{
+        emptyText : "物料类型",
+        width:120
+    },{ 
         xtype : "textfield", 
         name : "pr_detail", 
         emptyText : "物料名称", 
-        columnWidth : 0.25,
+        width:120
     },{
         xtype : "textfield", 
         name : "pr_code", 
         emptyText : "物料编号", 
-        columnWidth : 0.25,
+        width:120
     },{
         xtype : "textfield", 
         name : "pr_unit", 
-        emptyText : "物料单位", 
-        columnWidth : 0.25,
+        emptyText : "单位",    
+        width:100
+    },{
+        xtype : "textfield", 
+        name : "pr_brand", 
+        emptyText : "品牌", 
+        width:100
+    },{
+        xtype : "textfield", 
+        name : "pr_orispeccode", 
+        emptyText : "型号", 
+        width:100
     }],
 
     //字段属性

+ 2 - 0
frontend/saas-web/app/view/money/fundtransfer/FormPanelController.js

@@ -60,6 +60,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                             "flex": 1,
                             "dataIndex": "bk_thisamount",
                             "width": 120,
+                            align:'right',
                             "xtype": ""
                         }, {
                             "text": "建帐日期",
@@ -126,6 +127,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                             "flex": 1,
                             "dataIndex": "bk_thisamount",
                             "width": 120,
+                            align:'right',
                             "xtype": ""
                         }, {
                             "text": "建帐日期",

+ 6 - 3
frontend/saas-web/app/view/money/othreceipts/FormPanelController.js

@@ -84,17 +84,20 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
                             "text": "税率",
                             "flex": 1,
                             "dataIndex": "cu_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "承付天数",
                             "flex": 1,
                             "dataIndex": "cu_promisedays",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "额度",
                             "flex": 1,
                             "dataIndex": "cu_credit",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "客户地址",
                             "flex": 1,

+ 6 - 3
frontend/saas-web/app/view/money/othspendings/FormPanelController.js

@@ -61,11 +61,13 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
                         }, {
                             "text": "税率",
                             "dataIndex": "ve_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "承付天数",
                             "dataIndex": "ve_promisedays",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "纳税人识别号",
                             "dataIndex": "ve_bankaccount",
@@ -134,7 +136,8 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
                             "flex": 1,
                             "dataIndex": "bk_thisamount",
                             "width": 120,
-                            "xtype": ""
+                            "xtype": "",
+                            align:'right'
                         }, {
                             "text": "建帐日期",
                             "flex": 1,

+ 43 - 5
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -65,11 +65,13 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                         }, {
                             "text": "税率",
                             "dataIndex": "ve_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "承付天数",
                             "dataIndex": "ve_promisedays",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "纳税人识别号",
                             "dataIndex": "ve_bankaccount",
@@ -138,18 +140,21 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             "text": "单据金额",
                             "flex": 1,
                             "dataIndex": "sl_orderamount",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "已核销金额",
                             "flex": 0,
                             "dataIndex": "sl_yamount",
                             "width": 200,
+                            align:'right',
                             "items": null
                         }, {
                             "text": "未核销金额",
                             "flex": 1,
                             "dataIndex": "sl_namount",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }]
                     });
 
@@ -256,5 +261,38 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
             console.error(res);
             showToast('转单失败: ' + res.message);
         });
-     }
+     },
+
+     onSave: function() {
+        var me = this,
+        form = me.getView(),
+        viewModel = me.getViewModel(),
+        store1 = viewModel.get('detail0').detailStore,
+        store2 = viewModel.get('detail1').detailStore;
+
+        var valid = form.isValid();
+        if(!valid) {
+            showToast(form.invalidText);
+            return false;
+        }
+
+        var sum_pd_amount = store1.sum('pd_amount'); // 付款金额合计
+        var pb_discounts = viewModel.get('pb_discounts'); // 折扣金额
+        var sum_pbd_nowbalance = store2.sum('pbd_nowbalance'); // 本次核销金额合计
+
+        var flag = sum_pd_amount + pb_discounts - sum_pbd_nowbalance;
+
+        if(flag != 0) {
+            var t = flag > 0 ? '大' : '小';
+
+            showConfirm('提示', '付款金额' + t + '于本次折扣后核销金额,是否仍要保存?')
+            .then(function(y) {
+                if(y == 'yes') {
+                    me.save();
+                }
+            });
+        }else {
+            me.save();
+        }
+    },
 });

+ 20 - 10
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -65,19 +65,23 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                         },{
                             "text": "应收款余额",
                             "dataIndex": "cu_leftamount",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         },{
                             "text": "税率",
                             "dataIndex": "cu_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         },{
                             "text": "承付天数",
                             "dataIndex": "cu_promisedays",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         },{
                             "text": "额度",
                             "dataIndex": "cu_credit",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }]
                     }) ;   
 
@@ -140,15 +144,18 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                         },{
                             "text": "税率",
                             "dataIndex": "cu_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         },{
                             "text": "承付天数",
                             "dataIndex": "cu_promisedays",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         },{
                             "text": "额度",
                             "dataIndex": "cu_credit",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }]
                     }) ;   
 
@@ -205,18 +212,21 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                             "text": "单据金额",
                             "flex": 1,
                             "dataIndex": "sl_orderamount",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "已核销金额",
                             "flex": 0,
                             "dataIndex": "sl_yamount",
                             "width": 200,
-                            "items": null
+                            "items": null,
+                            align:'right'
                         }, {
                             "text": "未核销金额",
                             "flex": 1,
                             "dataIndex": "sl_namount",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }]
                     });
 

+ 4 - 1
frontend/saas-web/app/view/purchase/purchase/FormPanelController.js

@@ -61,7 +61,8 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         }, {
                             "text": "税率",
                             "dataIndex": "ve_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "承付天数",
                             "dataIndex": "ve_promisedays",
@@ -155,6 +156,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         }, {
                             "text": "最新采购单价",
                             "dataIndex": "pr_purcprice",
+                            align:'right',
                             "width": 0,
                         },{
                             "text": "仓库id",
@@ -172,6 +174,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",

+ 2 - 1
frontend/saas-web/app/view/purchase/purchase/QueryPanel.js

@@ -73,7 +73,8 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         datas: [
             ["TURNIN", "已入库"],
             ["UNTURNIN", "未入库"],
-            ["PARTIN", "部分入库"]
+            ["PART2IN", "部分入库"],
+            ["CLOSE", "已关闭"]
         ]
     }],
     moreQueryFormItems: [{

+ 1 - 4
frontend/saas-web/app/view/purchase/purchase/QueryPanelModel.js

@@ -1,7 +1,4 @@
 Ext.define('saas.view.purchase.purchase.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.purchase-purchase-querypanel',
-    data: {
-        closeEnable:false
-    }
+    alias: 'viewmodel.purchase-purchase-querypanel'
 });

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

@@ -66,11 +66,13 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         }, {
                             "text": "税率",
                             "dataIndex": "ve_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "承付天数",
                             "dataIndex": "ve_promisedays",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "纳税人识别号",
                             "dataIndex": "ve_bankaccount",
@@ -169,6 +171,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",

+ 6 - 2
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -65,11 +65,13 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         }, {
                             "text": "税率",
                             "dataIndex": "ve_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "承付天数",
                             "dataIndex": "ve_promisedays",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "纳税人识别号",
                             "dataIndex": "ve_bankaccount",
@@ -168,6 +170,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",
@@ -188,6 +191,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",

+ 8 - 3
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -83,17 +83,20 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                                 "text": "税率",
                                 "flex": 1,
                                 "dataIndex": "cu_taxrate",
-                                "width": 100
+                                "width": 100,
+                                align:'right'
                             }, {
                                 "text": "承付天数",
                                 "flex": 1,
                                 "dataIndex": "cu_promisedays",
-                                "width": 100
+                                "width": 100,
+                                align:'right'
                             }, {
                                 "text": "额度",
                                 "flex": 1,
                                 "dataIndex": "cu_credit",
-                                "width": 100
+                                "width": 100,
+                                align:'right'
                             }, {
                                 "text": "客户地址",
                                 "flex": 1,
@@ -174,6 +177,7 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",
@@ -194,6 +198,7 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",

+ 8 - 3
frontend/saas-web/app/view/sale/saleIn/FormPanelController.js

@@ -84,17 +84,20 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                             "text": "税率",
                             "flex": 1,
                             "dataIndex": "cu_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "承付天数",
                             "flex": 1,
                             "dataIndex": "cu_promisedays",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "额度",
                             "flex": 1,
                             "dataIndex": "cu_credit",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "客户地址",
                             "flex": 1,
@@ -174,6 +177,7 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",
@@ -194,6 +198,7 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",

+ 6 - 3
frontend/saas-web/app/view/sale/saleOut/FormPanelController.js

@@ -81,17 +81,20 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                                 "text": "税率",
                                 "flex": 1,
                                 "dataIndex": "cu_taxrate",
-                                "width": 100
+                                "width": 100,
+                                align:'right'
                             }, {
                                 "text": "承付天数",
                                 "flex": 1,
                                 "dataIndex": "cu_promisedays",
-                                "width": 100
+                                "width": 100,
+                                align:'right'
                             }, {
                                 "text": "额度",
                                 "flex": 1,
                                 "dataIndex": "cu_credit",
-                                "width": 100
+                                "width": 100,
+                                align:'right'
                             }, {
                                 "text": "客户地址",
                                 "flex": 1,

+ 12 - 5
frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js

@@ -64,11 +64,13 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         }, {
                             "text": "税率",
                             "dataIndex": "ve_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "承付天数",
                             "dataIndex": "ve_promisedays",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "纳税人识别号",
                             "dataIndex": "ve_bankaccount",
@@ -141,15 +143,18 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         },{
                             "text": "税率",
                             "dataIndex": "cu_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         },{
                             "text": "承付天数",
                             "dataIndex": "cu_promisedays",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         },{
                             "text": "额度",
                             "dataIndex": "cu_credit",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }]
                     }) ;   
 
@@ -233,6 +238,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",
@@ -253,6 +259,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",

+ 4 - 0
frontend/saas-web/app/view/stock/make/FormPanelController.js

@@ -205,6 +205,7 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",
@@ -225,6 +226,7 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",
@@ -311,6 +313,7 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",
@@ -331,6 +334,7 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",

+ 10 - 5
frontend/saas-web/app/view/stock/otherIn/FormPanelController.js

@@ -59,11 +59,13 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         }, {
                             "text": "税率",
                             "dataIndex": "ve_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "承付天数",
                             "dataIndex": "ve_promisedays",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "纳税人识别号",
                             "dataIndex": "ve_bankaccount",
@@ -141,15 +143,18 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         },{
                             "text": "税率",
                             "dataIndex": "cu_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         },{
                             "text": "承付天数",
                             "dataIndex": "cu_promisedays",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         },{
                             "text": "额度",
                             "dataIndex": "cu_credit",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }]
                     });
 

+ 12 - 5
frontend/saas-web/app/view/stock/otherOut/FormPanelController.js

@@ -59,11 +59,13 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         }, {
                             "text": "税率",
                             "dataIndex": "ve_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "承付天数",
                             "dataIndex": "ve_promisedays",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }, {
                             "text": "纳税人识别号",
                             "dataIndex": "ve_bankaccount",
@@ -136,15 +138,18 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         },{
                             "text": "税率",
                             "dataIndex": "cu_taxrate",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         },{
                             "text": "承付天数",
                             "dataIndex": "cu_promisedays",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         },{
                             "text": "额度",
                             "dataIndex": "cu_credit",
-                            "width": 100
+                            "width": 100,
+                            align:'right'
                         }]
                     }) ;   
 
@@ -230,6 +235,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "类型",
                             "dataIndex": "pr_kind",
@@ -250,6 +256,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",

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

@@ -0,0 +1,57 @@
+Ext.define('saas.view.sys.power.FormPanel', {
+    extend: 'Ext.form.Panel',
+    xtype: 'sys-power-formpanel',
+
+    controller: 'sys-power-formpanel',
+    viewModel: 'sys-power-formpanel',
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+    
+    //字段属性
+    _idField: 'id',
+    _readUrl:'/api/commons/enterprise/read',
+    _saveUrl:'/api/commons/enterprise/save',
+
+    //基础属性
+    frame:true,
+    layout: 'border',
+    autoScroll: true,
+
+    items: [{
+        title:'角色列表',
+        region:'west',
+        xtype: 'sys-power-treepanel',
+        layout:'fit',
+        height:'100%',
+        width: '15%',
+        rootVisible: false,
+        useArrows: true,
+        store : Ext.create('Ext.data.TreeStore', {
+            fields : ['NAME', 'ID'],
+            autoLoad:false,
+            root : {
+                text : 'Root',
+                id : 0,
+                expanded : true
+            }
+        }),
+    },{
+        title:'权限列表',
+        margin:'0 0 0 5',
+        region:'center',
+        layout:'fit',
+        height:'100%',
+        width: '85%',
+        xtype:'sys-power-treegrid'
+    }],
+
+    initComponent: function () {
+        var me = this;
+        me.callParent(arguments);
+    },
+
+    refresh:function(){
+        this.ownerCt.setTitle('权限设置')
+    }
+});

+ 66 - 0
frontend/saas-web/app/view/sys/power/FormPanelController.js

@@ -0,0 +1,66 @@
+Ext.define('saas.view.sys.power.FormPanelController', {
+    extend: 'Ext.app.ViewController',
+    alias: 'controller.sys-power-formpanel',
+
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+    FormUtil: Ext.create('saas.util.FormUtil'),
+
+    init: function (form) {
+        var me = this;
+        this.control({
+            'button[name=save]':{
+                click:function(){
+                    me.onSave();
+                }
+            }
+        });
+    },
+
+    onSave: function() {
+        var me = this,
+        form = this.getView();
+
+        var valid = form.isValid();
+        if(!valid) {
+            showToast('表单校验有误,请检查');
+            return false;
+        }
+
+        if(form.getForm().wasDirty==false){
+            showToast('未修改数据,请修改后保存');
+            return false;
+        }
+        
+        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);
+        });
+    }
+
+});

+ 5 - 0
frontend/saas-web/app/view/sys/power/FormPanelModel.js

@@ -0,0 +1,5 @@
+Ext.define('saas.view.sys.power.FormPanelModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.sys-power-formpanel',
+
+});

+ 41 - 0
frontend/saas-web/app/view/sys/power/TreeGrid.js

@@ -0,0 +1,41 @@
+Ext.define('saas.view.sys.power.TreeGrid', {
+    extend: 'Ext.tree.Panel',
+    xtype: 'sys-power-treegrid',
+
+    multiSelect: true,
+    singleExpand: true,
+
+    store: {
+        type: 'tree',
+        folderSort: true,
+    },
+
+    columns: [{
+        xtype: 'treecolumn', //this is so we know which column will show the tree
+        header: '模块',
+        dataIndex: 'task',
+        flex: 1,
+        sortable: true
+    }, {
+        header: '保存',
+        dataIndex: 'duration',
+        flex: 1,
+        sortable: true,
+        align: 'center',
+        xtype: 'checkcolumn',
+        formatter: 'this.formatHours'
+    },{
+        header: '提交',
+        dataIndex: 'user',
+        flex: 1,
+        xtype: 'checkcolumn',
+        sortable: true
+    }, {
+        xtype: 'checkcolumn',
+        header: '其他',
+        dataIndex: 'done',
+        width: 155,
+        stopSelection: false,
+        menuDisabled: true
+    }]
+});

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

@@ -0,0 +1,35 @@
+Ext.define('saas.view.sys.power.TreePanel', {
+    extend: 'Ext.tree.Panel',
+    xtype: 'sys-power-treepanel',
+
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+
+    initComponent: function () {
+        var me = this;
+        me.getStore().setRootNode({
+            text: 'root',
+            id: '0',
+            expanded: true,
+            children: [{
+                text: '测试',
+                iconCls: 'x-fa fa-wrench',
+                children: [{
+                    text: '叶子1',
+                    iconCls: 'x-fa fa-share-alt',
+                    leaf: true
+                },{
+                    text: '叶子2',
+                    iconCls: 'x-fa fa-flag',
+                    leaf: true
+                },{
+                    text: '叶子3',
+                    iconCls: 'x-fa fa-signal',
+                    leaf: true
+                }]
+            }]
+        });
+        me.callParent(arguments);
+    }
+});

+ 1 - 0
frontend/saas-web/overrides/i18n.js

@@ -20,6 +20,7 @@ function openTab(xtype, title, id, config) {
         mainTab.setActiveTab(mainTab.add(panel));
         Ext.resumeLayouts(true);
     }else {
+        panel.viewConfig = config;
         mainTab.setActiveTab(panel);
     }
 }

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


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
frontend/saas-web/packages/font-saas/resources/fonts/iconfont.js


+ 5 - 2
frontend/saas-web/packages/font-saas/resources/fonts/iconfont.svg

@@ -9,9 +9,9 @@ Created by iconfont
 </metadata>
 <defs>
 
-<font id="iconfont" horiz-adv-x="1024" >
+<font id="font-saas" horiz-adv-x="1024" >
   <font-face
-    font-family="iconfont"
+    font-family="font-saas"
     font-weight="500"
     font-stretch="normal"
     units-per-em="1024"
@@ -26,6 +26,9 @@ Created by iconfont
     <glyph glyph-name="document" unicode="&#58964;" d="M703.806 83.45799999999997v-145.491l223.781 177.459H735.774c-17.655 0-31.968-14.313-31.968-31.968zM831.682 831.5550000000001H192.318c-52.967 0-95.905-42.938-95.905-95.905v-703.3c0-52.967 42.938-95.905 95.905-95.905h447.555V116.577c0 35.311 28.625 63.937 63.936 63.937h223.778V735.65c0 52.967-42.938 95.905-95.905 95.905zM543.968 235.54100000000005H224.286v65.081h319.682v-65.081z m255.746 195.256H224.286v65.078h575.428v-65.078z m0 195.246H224.286v65.088h575.428v-65.088z"  horiz-adv-x="1024" />
 
     
+    <glyph glyph-name="switch-on" unicode="&#58914;" d="M1442.909091-128h-930.909091a512 512 0 1 0 0 1024h930.909091a512 512 0 1 0 0-1024zM1442.909091 384m-418.909091 0a418.909091 418.909091 0 1 1 837.818182 0 418.909091 418.909091 0 1 1-837.818182 0Z"  horiz-adv-x="1954" />
+
+    
     <glyph glyph-name="edit" unicode="&#59116;" d="M230.4 245.76c5.12 5.12 10.24 20.48 15.36 25.6l476.16 476.16 81.92-81.92-476.16-476.16c-5.12-5.12-20.48-10.24-25.6-15.36l-117.76-40.96L230.4 245.76z m465.92 527.36L220.16 296.96000000000004c-10.24-10.24-20.48-25.6-25.6-40.96l-51.2-138.24c-10.24-25.6 10.24-46.08 35.84-35.84l133.12 51.2c15.36 5.12 30.72 15.36 40.96 25.6l476.16 476.16c15.36 15.36 15.36 40.96 0 56.32l-81.92 81.92c-10.24 15.36-35.84 15.36-51.2 0zM261.12 281.6l81.92-81.92-25.6-25.6-81.92 81.92 25.6 25.6z m419.84 419.84l81.92-81.92-25.6-25.6-81.92 81.92 25.6 25.6zM133.12 51.200000000000045H921.6c10.24 0 20.48-10.24 20.48-20.48s-10.24-20.48-20.48-20.48H133.12c-10.24 0-20.48 10.24-20.48 20.48 5.12 15.36 10.24 20.48 20.48 20.48z"  horiz-adv-x="1024" />
 
     

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


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


+ 2 - 1
frontend/saas-web/packages/font-saas/sass/etc/icons.scss

@@ -1,8 +1,9 @@
-
 .sa-purchase:before { content: "\e613"; }
 
 .sa-document:before { content: "\e654"; }
 
+.sa-switch-on:before { content: "\e622"; }
+
 .sa-edit:before { content: "\e6ec"; }
 
 .sa-sale:before { content: "\e638"; }

+ 8 - 1
frontend/saas-web/resources/json/navigation.json

@@ -223,7 +223,7 @@
             "viewType": "other-address",
             "leaf": true
         }, {
-            "index":"customer",
+            "config":"customerkind",
             "id":"document-kind",
             "text": "客户类型",
             "viewType": "document-kind",
@@ -234,6 +234,7 @@
             "viewType": "other-productunit",
             "leaf": true
         }, {
+            "config":"productkind",
             "id":"document-kind",
             "text": "物料类型",
             "viewType": "document-kind",
@@ -244,6 +245,7 @@
             "viewType": "other-productbrand",
             "leaf": true
         }, {
+            "config":"inoutkind",
             "id":"document-kind",
             "text": "收支类别",
             "viewType": "document-kind",
@@ -264,6 +266,11 @@
             "text": "系统参数",
             "viewType": "sys-config-formpanel",
             "leaf": true
+        }, {
+            "id":"sys-power-formpanel",
+            "text": "权限设置",
+            "viewType": "sys-power-formpanel",
+            "leaf": true
         }, {
             "id":"sys-messagelog-datalist",
             "text": "操作日志",

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio