Browse Source

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

chenw 7 years ago
parent
commit
c61a4244cd
98 changed files with 1595 additions and 250 deletions
  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. 1 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/BankinformationMapper.java
  4. 5 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java
  5. 6 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/WarehouseMapper.java
  6. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/WarehouseService.java
  7. 12 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  8. 48 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/WarehouseServiceImpl.java
  9. 0 10
      applications/document/document-server/src/main/resources/mapper/BankinformationMapper.xml
  10. 10 0
      applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml
  11. 12 0
      applications/document/document-server/src/main/resources/mapper/WarehouseMapper.xml
  12. 4 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/BanksubledgerMapper.java
  13. 5 5
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedet.java
  14. 30 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java
  15. 4 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  16. 24 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  17. 6 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  18. 12 1
      applications/money/money-server/src/main/resources/mapper/BanksubledgerMapper.xml
  19. 1 5
      applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml
  20. 1 1
      applications/money/money-server/src/main/resources/mapper/FundtransferdetailMapper.xml
  21. 1 1
      applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml
  22. 1 1
      applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml
  23. 1 1
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  24. 13 13
      applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml
  25. 1 2
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  26. 2 2
      applications/sale/sale-server/src/main/resources/mapper/SaleMapper.xml
  27. 3 0
      applications/sale/sale-server/src/main/resources/mapper/SaledetailMapper.xml
  28. 1 1
      frontend/saas-web/app/model/money/PayBalance1.js
  29. 2 1
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  30. 2 1
      frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js
  31. 2 1
      frontend/saas-web/app/view/core/form/FormPanel.js
  32. 8 8
      frontend/saas-web/app/view/core/form/FormPanelController.js
  33. 2 3
      frontend/saas-web/app/view/core/report/ReportPanel.js
  34. 7 3
      frontend/saas-web/app/view/document/bom/FormController.js
  35. 54 18
      frontend/saas-web/app/view/document/bom/FormPanel.js
  36. 2 3
      frontend/saas-web/app/view/document/customer/FormPanel.js
  37. 14 3
      frontend/saas-web/app/view/document/kind/Kind.js
  38. 1 5
      frontend/saas-web/app/view/document/kind/KindController.js
  39. 17 6
      frontend/saas-web/app/view/document/product/BasePanel.js
  40. 3 3
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  41. 8 2
      frontend/saas-web/app/view/money/fundtransfer/FormPanelController.js
  42. 2 3
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  43. 4 2
      frontend/saas-web/app/view/money/fundtransfer/QueryPanelModel.js
  44. 9 7
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  45. 7 3
      frontend/saas-web/app/view/money/othreceipts/FormPanelController.js
  46. 4 2
      frontend/saas-web/app/view/money/othreceipts/QueryPanelModel.js
  47. 9 12
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  48. 19 4
      frontend/saas-web/app/view/money/othspendings/FormPanelController.js
  49. 4 2
      frontend/saas-web/app/view/money/othspendings/QueryPanelModel.js
  50. 2 7
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  51. 43 5
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  52. 4 2
      frontend/saas-web/app/view/money/payBalance/QueryPanelModel.js
  53. 2 7
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  54. 20 10
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  55. 4 2
      frontend/saas-web/app/view/money/recBalance/QueryPanelModel.js
  56. 1 1
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  57. 4 1
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  58. 3 2
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  59. 1 4
      frontend/saas-web/app/view/purchase/purchase/QueryPanelModel.js
  60. 5 2
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  61. 6 2
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  62. 30 11
      frontend/saas-web/app/view/purchase/report/Purchase.js
  63. 77 1
      frontend/saas-web/app/view/purchase/report/PurchaseController.js
  64. 116 0
      frontend/saas-web/app/view/purchase/report/PurchasePay.js
  65. 80 0
      frontend/saas-web/app/view/purchase/report/PurchasePayController.js
  66. 4 0
      frontend/saas-web/app/view/purchase/report/PurchasePayModel.js
  67. 164 0
      frontend/saas-web/app/view/sale/report/Sale.js
  68. 107 0
      frontend/saas-web/app/view/sale/report/SaleController.js
  69. 7 2
      frontend/saas-web/app/view/sale/report/SaleIn.js
  70. 4 0
      frontend/saas-web/app/view/sale/report/SaleModel.js
  71. 105 0
      frontend/saas-web/app/view/sale/report/SaleProfit.js
  72. 107 0
      frontend/saas-web/app/view/sale/report/SaleProfitController.js
  73. 4 0
      frontend/saas-web/app/view/sale/report/SaleProfitModel.js
  74. 2 2
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  75. 8 3
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  76. 0 1
      frontend/saas-web/app/view/sale/sale/FormPanelModel.js
  77. 8 3
      frontend/saas-web/app/view/sale/saleIn/FormPanelController.js
  78. 4 1
      frontend/saas-web/app/view/sale/saleIn/QueryPanelModel.js
  79. 0 1
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  80. 6 3
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  81. 4 1
      frontend/saas-web/app/view/sale/saleOut/QueryPanelModel.js
  82. 12 5
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js
  83. 4 0
      frontend/saas-web/app/view/stock/make/FormPanelController.js
  84. 10 5
      frontend/saas-web/app/view/stock/otherIn/FormPanelController.js
  85. 12 5
      frontend/saas-web/app/view/stock/otherOut/FormPanelController.js
  86. 57 0
      frontend/saas-web/app/view/sys/power/FormPanel.js
  87. 66 0
      frontend/saas-web/app/view/sys/power/FormPanelController.js
  88. 5 0
      frontend/saas-web/app/view/sys/power/FormPanelModel.js
  89. 41 0
      frontend/saas-web/app/view/sys/power/TreeGrid.js
  90. 35 0
      frontend/saas-web/app/view/sys/power/TreePanel.js
  91. 1 0
      frontend/saas-web/overrides/i18n.js
  92. BIN
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.eot
  93. 0 0
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.js
  94. 5 2
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.svg
  95. BIN
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.ttf
  96. BIN
      frontend/saas-web/packages/font-saas/resources/fonts/iconfont.woff
  97. 2 1
      frontend/saas-web/packages/font-saas/sass/etc/icons.scss
  98. 17 4
      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();
     }
 

+ 1 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/BankinformationMapper.java

@@ -20,9 +20,8 @@ public interface BankinformationMapper extends CommonBaseMapper<Bankinformation>
 
     int updateByPrimaryKeyWithBLOBs(Bankinformation record);
 
-    int updateByPrimaryKey(Bankinformation record);
-
     List<Bankinformation> selectBankinformationBycondition(@Param("con") String con, @Param("companyId") Long companyId);
 
     List<ComboDTO> getCombo(@Param("companyId") Long companyId);
+
 }

+ 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

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

@@ -292,16 +292,6 @@
       bk_remark = #{bkRemark,jdbcType=LONGVARCHAR}
     where bk_id = #{bkId,jdbcType=INTEGER}
   </update>
-  <update id="updateBankcode">
-    update bankinformation
-    set bk_thisamount = nvl(#{bk_thisamount,jdbcType=DOUBLE},0) ${symbol} #{nowbalance}
-    where bk_bankcode = #{bankcode,jdbcType=VARCHAR}
-  </update>
-
-  <select id="selectThisamount" resultType="java.lang.Double" parameterType="com.usoftchina.saas.document.entities.Bankinformation">
-   select bk_thisamount from bankinformation
-    where bk_bankcode = #{bankcode,jdbcType=VARCHAR}
-  </select>
 
   <select id="selectAll" resultMap="BaseResultMap">
     SELECT * FROM bankinformation

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

+ 4 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/BanksubledgerMapper.java

@@ -35,4 +35,8 @@ public interface BanksubledgerMapper extends CommonBaseMapper<Banksubledger> {
     int updateByPrimaryKeySelective(Banksubledger record);
 
     int updateByPrimaryKey(Banksubledger record);
+
+    int updateBankcode(@Param("bk_thisamount") Double bk_thisamount, @Param("nowbalance") Double nowbalance,
+                       @Param("bankcode") String bankcode, @Param("symbol") String symbol);
+    Double selectThisamount(String bankcode);
 }

+ 5 - 5
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedet.java

@@ -7,7 +7,7 @@ import java.util.Date;
 
 public class Paybalancedet extends CommonBaseEntity implements Serializable {
 
-    private Integer pd_rbid;
+    private Integer pd_pbid;
 
     private Integer pd_detno;
 
@@ -39,12 +39,12 @@ public class Paybalancedet extends CommonBaseEntity implements Serializable {
 
     private String pd_text5;
 
-    public Integer getPd_rbid() {
-        return pd_rbid;
+    public Integer getPd_pbid() {
+        return pd_pbid;
     }
 
-    public void setPd_rbid(Integer pd_rbid) {
-        this.pd_rbid = pd_rbid;
+    public void setPd_pbid(Integer pd_pbid) {
+        this.pd_pbid = pd_pbid;
     }
 
     public Integer getPd_detno() {

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

@@ -93,6 +93,20 @@ public class FundtransferServiceImpl implements FundtransferService {
         }else {
             fundtransferMapper.updateByPrimaryKeySelective(fundtransfer);
         }
+
+
+        //取从表金额
+        List<Fundtransferdetail> fundtransferdetailList = fundtran.getItems();
+        Iterator isList = fundtransferdetailList.iterator();
+        while (isList.hasNext()){
+            Fundtransferdetail fundtransferdetail = (Fundtransferdetail) isList.next();
+            Double amount = banksubledgerMapper.selectThisamount(fundtransferdetail.getFtd_bankcode());
+            Double inamount = banksubledgerMapper.selectThisamount(fundtransferdetail.getFtd_inbankcode());
+            banksubledgerMapper.updateBankcode(amount, fundtransferdetail.getFtd_nowbalance(),
+                    fundtransferdetail.getFtd_bankcode(), "-");
+            banksubledgerMapper.updateBankcode(inamount, fundtransferdetail.getFtd_nowbalance(),
+                    fundtransferdetail.getFtd_bankcode(), "+");
+        }
     }
 
     @Override
@@ -106,6 +120,20 @@ public class FundtransferServiceImpl implements FundtransferService {
         //删除中间表
         fundtransfer = fundtransferMapper.selectByPrimaryKey(id);
         banksubledgerMapper.deleteByPrimaryKey(fundtransfer.getFt_code(), "其他收入单");
+
+        //资金
+        //取从表金额
+        List<Fundtransferdetail> fundtransferdetailList = fundtransferdetailMapper.selectByPrimaryKey(id);
+        Iterator isList = fundtransferdetailList.iterator();
+        while (isList.hasNext()){
+            Fundtransferdetail fundtransferdetail = (Fundtransferdetail) isList.next();
+            Double amount = banksubledgerMapper.selectThisamount(fundtransferdetail.getFtd_bankcode());
+            Double inamount = banksubledgerMapper.selectThisamount(fundtransferdetail.getFtd_inbankcode());
+            banksubledgerMapper.updateBankcode(amount, fundtransferdetail.getFtd_nowbalance(),
+                    fundtransferdetail.getFtd_bankcode(), "+");
+            banksubledgerMapper.updateBankcode(inamount, fundtransferdetail.getFtd_nowbalance(),
+                    fundtransferdetail.getFtd_bankcode(), "-");
+        }
     }
 
 
@@ -140,7 +168,8 @@ public class FundtransferServiceImpl implements FundtransferService {
             fundtransfer.setFt_statuscode(Status.AUDITED.name());
             Fundtran fundtran = this.select(Math.toIntExact(fundtransfer.getId()));
             this.changBankUntil(fundtran);
-            fundtransferMapper.updateByPrimaryKeySelective(fundtransfer);
+            this.insert(fundtran);
+//            fundtransferMapper.updateByPrimaryKeySelective(fundtransfer);
         }
     }
 

+ 4 - 6
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java

@@ -40,8 +40,6 @@ public class OthreceiptsServiceImpl implements OthreceiptsService {
     private MaxnumberService maxnumberService;
     @Autowired
     private BanksubledgerMapper banksubledgerMapper;
-    @Autowired
-    private BankinformationMapper bankinformationMapper;
 
     @Override
     public DocBaseDTO insert(Othte othte) {
@@ -98,13 +96,13 @@ public class OthreceiptsServiceImpl implements OthreceiptsService {
             othreceiptsMapper.updateByPrimaryKeySelective(othreceipts);
         }
 
-        Double amount = bankinformationMapper.selectThisamount(othreceipts.getOr_bankcode());
+        Double amount = banksubledgerMapper.selectThisamount(othreceipts.getOr_bankcode());
         //取从表金额
         List<Othreceiptsdetail> othreceiptsdetailList = othte.getItems();
         Iterator isList = othreceiptsdetailList.iterator();
         while (isList.hasNext()){
             Othreceiptsdetail othreceiptsdetail = (Othreceiptsdetail) isList.next();
-            bankinformationMapper.updateBankcode(amount, othreceiptsdetail.getOrd_nowbalance(),
+            banksubledgerMapper.updateBankcode(amount, othreceiptsdetail.getOrd_nowbalance(),
                     othreceipts.getOr_bankcode(), "+");
         }
     }
@@ -122,12 +120,12 @@ public class OthreceiptsServiceImpl implements OthreceiptsService {
         banksubledgerMapper.deleteByPrimaryKey(othreceipts.getOr_code(), "其他收入单");
 
         //更新资金
-        Double amount = bankinformationMapper.selectThisamount(othreceipts.getOr_bankcode());
+        Double amount = banksubledgerMapper.selectThisamount(othreceipts.getOr_bankcode());
         List<Othreceiptsdetail> othreceiptsdetailList = othreceiptsdetailMapper.selectByPrimaryKey(id);
         Iterator isList = othreceiptsdetailList.iterator();
         while (isList.hasNext()){
             Othreceiptsdetail othreceiptsdetail = (Othreceiptsdetail) isList.next();
-            bankinformationMapper.updateBankcode(amount, othreceiptsdetail.getOrd_nowbalance(),
+            banksubledgerMapper.updateBankcode(amount, othreceiptsdetail.getOrd_nowbalance(),
                     othreceipts.getOr_bankcode(), "-");
         }
 

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

@@ -10,6 +10,7 @@ import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.mapper.BankinformationMapper;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.money.mapper.*;
 import com.usoftchina.saas.money.po.*;
@@ -122,6 +123,16 @@ public class OthspendingsServiceImpl implements OthspendingsService {
         }else {
             othspendingsMapper.updateByPrimaryKeySelective(othspendings);
         }
+
+        Double amount = banksubledgerMapper.selectThisamount(othspendings.getOs_bankcode());
+        //取从表金额
+        List<Othspendingsdetail> othspendingsdetailList = othsp.getItems();
+        Iterator isList = othspendingsdetailList.iterator();
+        while (isList.hasNext()){
+            Othspendingsdetail othspendingsdetail = (Othspendingsdetail) isList.next();
+            banksubledgerMapper.updateBankcode(amount, othspendingsdetail.getOsd_nowbalance(),
+                    othspendings.getOs_bankcode(), "+");
+        }
     }
 
     @Override
@@ -135,6 +146,17 @@ public class OthspendingsServiceImpl implements OthspendingsService {
         //删除中间表
         othspendings = othspendingsMapper.selectByPrimaryKey(id);
         banksubledgerMapper.deleteByPrimaryKey(othspendings.getOs_code(), "其他收入单");
+
+        //资金
+        Double amount = banksubledgerMapper.selectThisamount(othspendings.getOs_bankcode());
+        //取从表金额
+        List<Othspendingsdetail> othspendingsdetailList = othspendingsdetailMapper.selectByPrimaryKey(id);
+        Iterator isList = othspendingsdetailList.iterator();
+        while (isList.hasNext()){
+            Othspendingsdetail othspendingsdetail = (Othspendingsdetail) isList.next();
+            banksubledgerMapper.updateBankcode(amount, othspendingsdetail.getOsd_nowbalance(),
+                    othspendings.getOs_bankcode(), "-");
+        }
     }
 
     @Override
@@ -157,7 +179,8 @@ public class OthspendingsServiceImpl implements OthspendingsService {
             othspendings.setOs_statuscode(Status.AUDITED.name());
             Othsp othsp = this.select(Math.toIntExact(othspendings.getId()));
             this.changBankUntil(othsp);
-            othspendingsMapper.updateByPrimaryKeySelective(othspendings);
+            this.insert(othsp);
+//            othspendingsMapper.updateByPrimaryKeySelective(othspendings);
         }
     }
 

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

@@ -57,7 +57,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
 
         System.out.println("code:"+paybalance.getPb_code());
 
-        Long rbId = paybalance.getId();
+        Long pbId = paybalance.getId();
 
         //校验数据
         checkPaybalance(pay);
@@ -67,14 +67,14 @@ public class PaybalanceServiceImpl implements PaybalanceService {
         }else {
             paybalance.setCompanyId(BaseContextHolder.getCompanyId());
             paybalanceMapper.insertSelective(paybalance);
-            rbId = paybalance.getId();
-            System.out.println("rbid:" + rbId);
+            pbId = paybalance.getId();
+            System.out.println("rbid:" + pbId);
         }
 
         Iterator isdet = paybalancedet.iterator();
         while (isdet.hasNext()){
             Paybalancedet paybalancedet1 = (Paybalancedet) isdet.next();
-            paybalancedet1.setPd_rbid(Math.toIntExact(rbId));
+            paybalancedet1.setPd_pbid(Math.toIntExact(pbId));
             paybalancedet1.setCompanyId(BaseContextHolder.getCompanyId());
             if (paybalancedet1.getId() > 0 ){
                 paybalancedetMapper.updateByPrimaryKeySelective(paybalancedet1);
@@ -86,7 +86,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
         Iterator isdetl = paybalancedetail.iterator();
         while (isdetl.hasNext()){
             Paybalancedetail paybalancedetail1 = (Paybalancedetail) isdetl.next();
-            paybalancedetail1.setPbd_pbid(Math.toIntExact(rbId));
+            paybalancedetail1.setPbd_pbid(Math.toIntExact(pbId));
             paybalancedetail1.setCompanyId(BaseContextHolder.getCompanyId());
             if (paybalancedetail1.getId() > 0 ){
                 paybalancedetailMapper.updateByPrimaryKeySelective(paybalancedetail1);
@@ -94,7 +94,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
                 paybalancedetailMapper.insertSelective(paybalancedetail1);
             }
         }
-        return new DocBaseDTO(rbId, pb_code, BillCodeSeq.PAYBALANCE.getCaller());
+        return new DocBaseDTO(pbId, pb_code, BillCodeSeq.PAYBALANCE.getCaller());
     }
 
     /**

+ 12 - 1
applications/money/money-server/src/main/resources/mapper/BanksubledgerMapper.xml

@@ -430,10 +430,21 @@
       updatedate = #{updatedate,jdbcType=TIMESTAMP}
     where bl_id = #{bl_id,jdbcType=INTEGER}
   </update>
-    <select id="selectCode" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <select id="selectCode" parameterType="java.lang.String" resultType="java.lang.String">
         select bl_code
         from banksubledger
         where bl_code = #{bl_code,jdbcType=VARCHAR}
     </select>
 
+    <update id="updateBankcode">
+    update bankinformation
+    set bk_thisamount = (IFNULL(#{bk_thisamount,jdbcType=DOUBLE},0) ${symbol} #{nowbalance})
+    where bk_bankcode = #{bankcode,jdbcType=VARCHAR}
+  </update>
+
+    <select id="selectThisamount" resultType="java.lang.Double" parameterType="java.lang.String">
+   select bk_thisamount from bankinformation
+    where bk_bankcode = #{bankcode,jdbcType=VARCHAR}
+  </select>
+
 </mapper>

+ 1 - 5
applications/money/money-server/src/main/resources/mapper/FundtransferMapper.xml

@@ -88,9 +88,7 @@
       <if test="updaterId != null" >
         updaterId,
       </if>
-      <if test="updatedate != null" >
         updatedate,
-      </if>
       <if test="ft_text1 != null" >
         ft_text1,
       </if>
@@ -138,9 +136,7 @@
       <if test="updaterId != null" >
         #{updaterId,jdbcType=INTEGER},
       </if>
-      <if test="updatedate != null" >
-        #{updatedate,jdbcType=TIMESTAMP},
-      </if>
+        #{now(),jdbcType=TIMESTAMP},
       <if test="ft_text1 != null" >
         #{ft_text1,jdbcType=VARCHAR},
       </if>

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/FundtransferdetailMapper.xml

@@ -208,7 +208,7 @@
         ftd_detno = #{ftd_detno,jdbcType=INTEGER},
       </if>
       <if test="ftd_ym != null" >
-        ftd_ym = #{ftd_ym,jdbcType=INTEGER},
+        ftd_ym = to_char(#{ftd_ym,jdbcType=INTEGER},'yyyymm'),
       </if>
       <if test="ftd_bankid != null" >
         ftd_bankid = #{ftd_bankid,jdbcType=INTEGER},

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml

@@ -150,7 +150,7 @@
         ord_detno = #{ord_detno,jdbcType=INTEGER},
       </if>
       <if test="ord_ym != null" >
-        ord_ym = #{ord_ym,jdbcType=INTEGER},
+        ord_ym = to_char(#{ord_ym,jdbcType=INTEGER},'yyyymm'),
       </if>
       <if test="ord_type != null" >
         ord_type = #{ord_type,jdbcType=VARCHAR},

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml

@@ -156,7 +156,7 @@
         osd_detno = #{osd_detno,jdbcType=INTEGER},
       </if>
       <if test="osd_ym != null" >
-        osd_ym = #{osd_ym,jdbcType=INTEGER},
+        osd_ym = to_char(#{osd_ym,jdbcType=INTEGER}, 'yyyymm'),
       </if>
       <if test="osd_type != null" >
         osd_type = #{osd_type,jdbcType=VARCHAR},

+ 1 - 1
applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml

@@ -444,7 +444,7 @@
   select
   <include refid="Base_Column_List" />
   from paybalance
-    left join paybalancedet on pb_id=pd_rbid left join paybalancedetail on pb_id=pbd_rbid
+    left join paybalancedet on pb_id=pd_pbid left join paybalancedetail on pb_id=pbd_rbid
     <where>
       <if test="con != null">
         ${con}

+ 13 - 13
applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="com.usoftchina.saas.money.mapper.PaybalancedetMapper" >
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Paybalancedet" >
     <id column="pd_id" property="id" jdbcType="INTEGER" />
-    <result column="pd_rbid" property="pd_rbid" jdbcType="INTEGER" />
+    <result column="pd_pbid" property="pd_pbid" jdbcType="INTEGER" />
     <result column="pd_detno" property="pd_detno" jdbcType="INTEGER" />
     <result column="pd_ym" property="pd_ym" jdbcType="INTEGER" />
     <result column="pd_bankid" property="pd_bankid" jdbcType="INTEGER" />
@@ -23,7 +23,7 @@
     <result column="pd_text5" property="pd_text5" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
-    pd_id, pd_rbid, pd_detno, pd_ym, pd_bankid, pd_bankcode, pd_bankname, pd_amount, 
+    pd_id, pd_pbid, pd_detno, pd_ym, pd_bankid, pd_bankcode, pd_bankname, pd_amount,
     pd_paymethod, pd_paycode, pd_remark, companyId, updaterId, updatedate, pd_text1, 
     pd_text2, pd_text3, pd_text4, pd_text5
   </sql>
@@ -31,7 +31,7 @@
     select 
     <include refid="Base_Column_List" />
     from paybalancedet
-    where pd_rbid = #{id,jdbcType=INTEGER}
+    where pd_pbid = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from paybalancedet
@@ -40,12 +40,12 @@
 
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
     delete from paybalancedet
-    where pd_rbid = #{id,jdbcType=INTEGER}
+    where pd_pbid = #{id,jdbcType=INTEGER}
   </delete>
 
   <!--<insert id="insert" parameterType="com.usoftchina.saas.money.po.Paybalancedet" >-->
   <insert id="insert" parameterType="com.usoftchina.saas.money.po.Paybalancedet" >
-    insert into paybalancedet (pd_id, pd_rbid, pd_detno,
+    insert into paybalancedet (pd_id, pd_pbid, pd_detno,
       pd_ym, pd_bankid, pd_bankcode,
       pd_bankname, pd_amount, pd_paymethod,
       pd_paycode, pd_remark, companyId,
@@ -64,8 +64,8 @@
   <insert id="insertSelective" parameterType="com.usoftchina.saas.money.po.Paybalancedet" >
     insert into paybalancedet
     <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="pd_rbid != null" >
-        pd_rbid,
+      <if test="pd_pbid != null" >
+        pd_pbid,
       </if>
       <if test="pd_detno != null" >
         pd_detno,
@@ -120,8 +120,8 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="pd_rbid != null" >
-        #{pd_rbid,jdbcType=INTEGER},
+      <if test="pd_pbid != null" >
+        #{pd_pbid,jdbcType=INTEGER},
       </if>
       <if test="pd_detno != null" >
         #{pd_detno,jdbcType=INTEGER},
@@ -179,8 +179,8 @@
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Paybalancedet" >
     update paybalancedet
     <set >
-      <if test="pd_rbid != null" >
-        pd_rbid = #{pd_rbid,jdbcType=INTEGER},
+      <if test="pd_pbid != null" >
+        pd_pbid = #{pd_pbid,jdbcType=INTEGER},
       </if>
       <if test="pd_detno != null" >
         pd_detno = #{pd_detno,jdbcType=INTEGER},
@@ -238,7 +238,7 @@
   </update>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.money.po.Paybalancedet" >
     update paybalancedet
-    set pd_rbid = #{pdRbid,jdbcType=INTEGER},
+    set pd_pbid = #{pdPbid,jdbcType=INTEGER},
       pd_detno = #{pdDetno,jdbcType=INTEGER},
       pd_ym = #{pdYm,jdbcType=INTEGER},
       pd_bankid = #{pdBankid,jdbcType=INTEGER},
@@ -276,7 +276,7 @@
     select
     <include refid="Base_Column_List" />
     from paybalance
-    left join paybalancedet on pb_id=pd_rbid left join paybalancedetail on pb_id=pbd_rbid
+    left join paybalancedet on pb_id=pd_pbid left join paybalancedetail on pb_id=pbd_rbid
     <where>
       <if test="con != null">
         ${con}

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

+ 1 - 1
frontend/saas-web/app/model/money/PayBalance1.js

@@ -3,7 +3,7 @@ Ext.define('saas.model.money.PayBalance1', {
     fields: [
         { name: 'id', type: 'int' },
         { name: 'pd_id', type: 'int' },
-        { name: 'pd_rbid', type: 'int' },
+        { name: 'pd_pbid', type: 'int' },
         { name: 'pd_detno', type: 'int' },
         { name: 'pd_ym', type: 'int' },
         { name: 'pd_bankid', type: 'int' },

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

+ 2 - 3
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -24,9 +24,8 @@ Ext.define('saas.view.core.report.ReportPanel', {
 
     initComponent: function() {
         var me = this;
-
         var store = me.initStore();
-
+        columnWidth: 0.25,
         Ext.apply(me, {
             items: [{
                 xtype: 'form',
@@ -40,7 +39,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
                 },
                 items: me.initSearchItems().concat([{
                     xtype: 'container',
-                    columnWidth: 0.5,
+                    columnWidth: me.QueryWidth || 0.5,
                     items: [{
                         xtype: 'button',
                         text: '查询',

+ 7 - 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'
@@ -23,6 +22,8 @@ Ext.define('saas.view.document.bom.FormController', {
                             from:'pr_spec',to:'pr_spec'
                         },{
                             from:'pr_unit',to:'bd_unit'
+                        },{
+                            from:'id',to:'bd_sonid',ignore:true 
                         }],
                         //联想设置
                         dbtpls:[{
@@ -67,6 +68,7 @@ Ext.define('saas.view.document.bom.FormController', {
                             "text": "最新采购单价",
                             "dataIndex": "pr_purcprice",
                             "width": 0,
+                            align:'right'
                         },{
                             "text": "仓库id",
                             "dataIndex": "pr_whid",
@@ -76,13 +78,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 +106,7 @@ Ext.define('saas.view.document.bom.FormController', {
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
+                            align:'right'
                         },{
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",

+ 54 - 18
frontend/saas-web/app/view/document/bom/FormPanel.js

@@ -57,12 +57,12 @@ Ext.define('saas.view.document.bom.FormPanel', {
     },{
         xtype: 'textfield',
         name: 'bo_mothername',
-        fieldLabel: 'BOM名称',
+        fieldLabel: '母件名称',
         allowBlank: false
     },{
         xtype: 'textfield',
         name: 'bo_mothercode',
-        fieldLabel: 'BOM编号',
+        fieldLabel: '母件编号',
         allowBlank: false
     },{
         xtype: 'textfield',
@@ -73,13 +73,9 @@ Ext.define('saas.view.document.bom.FormPanel', {
         name: 'bo_statuscode',
         fieldLabel: '状态码'
     },{
-        xtype : "datefield", 
-        name : "createTime", 
-        fieldLabel : "创建时间"
-    },{  
-        xtype : "datefield", 
-        name : "updateTime", 
-        fieldLabel : "更新时间"
+        xtype: 'textfield',
+        name: 'bo_version',
+        fieldLabel: '版本'
     }, {
         xtype : "detailGridField",
         detnoColumn: 'bd_detno',
@@ -101,7 +97,7 @@ Ext.define('saas.view.document.bom.FormPanel', {
             },
             {
                 allowBlank:false,
-                text : "子件编号", 
+                text : "物料编号", 
                 dataIndex : "bd_soncode", 
                 editor : {
                     displayField : "display", 
@@ -116,8 +112,26 @@ Ext.define('saas.view.document.bom.FormPanel', {
                     valueField : "value", 
                     xtype : "multidbfindtrigger"
                 }
-            },
-            {
+            }, {
+                allowBlank:false,
+                text : "物料ID", 
+                hidden : true, 
+                dataIndex : "bd_sonid", 
+            }, {
+                text : "物料名称", 
+                dataIndex : "pr_detail",
+                ignore:true,
+                renderer: function (v, m, r) {
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
+                }
+            }, {
+                text : "物料规格", 
+                dataIndex : "pr_spec",
+                ignore:true,
+                renderer: function (v, m, r) {
+                    return r.data["productDTO"]?r.data["productDTO"][m.column.dataIndex]:v;
+                }
+            }, {
                 allowBlank:false,
                 text : "单位", 
                 editor : {
@@ -127,14 +141,20 @@ Ext.define('saas.view.document.bom.FormPanel', {
             },
             {
                 allowBlank:false,
-                text : "单位用量", 
+                text : "用量", 
+                dataIndex : "bd_baseqty",
                 editor : {
-                    xtype : "textfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 3,
+                    minValue:0
                 },
-                dataIndex : "bd_baseqty", 
-            },
-            {
-                allowBlank:false,
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
+            }, {
                 text : "替代料", 
                 dataIndex : "bd_replace", 
                 editor : {
@@ -150,7 +170,23 @@ Ext.define('saas.view.document.bom.FormPanel', {
                     valueField : "value", 
                     xtype : "multidbfindtrigger"
                 }
+            }, {
+                text : "备注", 
+                dataIndex : "bd_remark",
+                width : 250, 
+                items : null,
+                editor : {
+                    xtype : "textfield"
+                },
             }]
+    },{
+        xtype : "datefield", 
+        name : "createTime", 
+        fieldLabel : "创建时间"
+    },{  
+        xtype : "datefield", 
+        name : "updateTime", 
+        fieldLabel : "更新时间"
     }],
 
     auditTexts: {

+ 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
     }],
 
     //字段属性

+ 3 - 3
frontend/saas-web/app/view/money/fundtransfer/FormPanel.js

@@ -50,9 +50,9 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                 editor : {
                     xtype : "numberfield"
                 },
-                width : 120.0, 
-                xtype : "hidden",
-                items : null
+                width : 120.0,
+                items : null,
+                hidden: true
             }, {
                 text : "转出账户ID", 
                 dataIndex : "ftd_bankid", 

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

@@ -9,6 +9,8 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         dataUrl:'/api/document/bankinformation/list',
+                        addXtype: 'other-bankinformation',
+                        addTitle:'账户资料',
                         dbfinds:[
                         {
                             from:'bk_bankcode',to:'ftd_bankcode'
@@ -16,7 +18,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                             from:'bk_bankname',to:'ftd_bankname'
                         },{
                             from:'id',to:'ftd_bankid'
-                    }],
+                        }],
                         dbtpls:[{
                             field:'bk_bankcode',width:100
                         },{
@@ -60,6 +62,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                             "flex": 1,
                             "dataIndex": "bk_thisamount",
                             "width": 120,
+                            align:'right',
                             "xtype": ""
                         }, {
                             "text": "建帐日期",
@@ -75,6 +78,8 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         dataUrl:'/api/document/bankinformation/list',
+                        addXtype: 'other-bankinformation',
+                        addTitle:'账户资料',
                         dbfinds:[
                         {
                             from:'bk_bankcode',to:'ftd_inbankcode'
@@ -82,7 +87,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                             from:'bk_bankname',to:'ftd_inbankname'
                         },{
                             from:'id',to:'ftd_inbankid'
-                    }],
+                        }],
                         dbtpls:[{
                             field:'bk_bankcode',width:100
                         },{
@@ -126,6 +131,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                             "flex": 1,
                             "dataIndex": "bk_thisamount",
                             "width": 120,
+                            align:'right',
                             "xtype": ""
                         }, {
                             "text": "建帐日期",

+ 2 - 3
frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js

@@ -16,15 +16,14 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
     queryGridConfig: {
         idField: 'id',
         codeField: 'ft_code',
-        addTitle: '其它收入单',
+        addTitle: '资金转存',
         addXtype: 'money-fundtransfer-formpanel',
         defaultCondition:'',
         baseVastUrl: '/api/money/fundtransfer/',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
-            width: 0,
-            xtype: 'hidden'
+            width: 0
         }, {
             text: '单据编号',
             dataIndex: 'ft_code',

+ 4 - 2
frontend/saas-web/app/view/money/fundtransfer/QueryPanelModel.js

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

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

@@ -37,9 +37,10 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
      }, {
          xtype : "dbfindtrigger", 
          name : "or_custname", 
-         fieldLabel : "客户名称"
+         fieldLabel : "客户名称",
+         allowBlank : false
      }, {
-        xtype : 'hidden',
+         xtype : 'hidden',
          name : 'or_bankid', 
          fieldLabel : '账户ID'
      }, {
@@ -49,7 +50,8 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
      }, {
          xtype : "dbfindtrigger", 
          name : "or_bankname", 
-         fieldLabel : "账户名称"
+         fieldLabel : "账户名称",
+         allowBlank : false
      }, {
         name : "detailGridField", 
         xtype : "detailGridField", 
@@ -64,13 +66,13 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                 xtype : "numbercolumn",
                 width:0
             }, {
-                text : "期间", 
-                dataIndex : "ord_ym", 
+                text : "期间",
+                dataIndex : "ord_ym",
                 editor : {
                     xtype : "numberfield"
                 },
-                width : 120.0, 
-                xtype : "numbercolumn", 
+                width : 120.0,
+                hidden: true,
                 items : null
             }, {
                 text : "收入类别", 

+ 7 - 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,
@@ -110,6 +113,7 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
                 beforerender: function (f) {
                     Ext.apply(f, {
                         dataUrl: '/api/document/bankinformation/list',
+                        addTitle: '账户资料',
                         dbfinds: [{
                             from: 'bk_bankcode',
                             to: 'or_bankcode'

+ 4 - 2
frontend/saas-web/app/view/money/othreceipts/QueryPanelModel.js

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

+ 9 - 12
frontend/saas-web/app/view/money/othspendings/FormPanel.js

@@ -37,7 +37,8 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
      }, {
          xtype : "dbfindtrigger",
          name : "os_vendname", 
-         fieldLabel : "供应商名称"
+         fieldLabel : "供应商名称",
+         allowBlank : false
      }, {
         xtype : 'hidden',
          name : 'os_bankid', 
@@ -49,15 +50,12 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
      }, {
          xtype : "dbfindtrigger",
          name : "os_bankname", 
-         fieldLabel : "结算账户名称"
+         fieldLabel : "账户名称",
+         allowBlank : false
      }, {
         xtype:'datefield',
         name : 'os_date',
         fieldLabel : '单据日期'
-    },{
-        xtype : 'numberfield',
-        name : 'os_amount',
-        fieldLabel : '付款金额'
     },{
         name : "detailGridField", 
         xtype : "detailGridField", 
@@ -78,7 +76,7 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                     xtype : "numberfield"
                 },
                 width : 120.0, 
-                xtype : "hidden",
+                hidden: true,
                 items : null
             }, {
                 text : "支出类别", 
@@ -136,11 +134,10 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                 },
             }
         ]
-    }, {
-        xtype : "numberfield", 
-        name : "os_amount", 
-        fieldLabel : "收款金额",
-        readOnly:true
+    },{
+        xtype : 'numberfield',
+        name : 'os_amount',
+        fieldLabel : '付款金额'
     },{
         xtype : "textfield", 
         name : "os_remark", 

+ 19 - 4
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",
@@ -88,6 +90,7 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
                 beforerender: function (f) {
                     Ext.apply(f, {
                         dataUrl: '/api/document/bankinformation/list',
+                        addTitle: '账户资料',
                         dbfinds: [{
                             from: 'bk_bankcode',
                             to: 'os_bankcode'
@@ -95,9 +98,20 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
                             from: 'bk_bankname',
                             to: 'os_bankname'
                         }, {
-                            from: 'bk_id',
+                            from: 'id',
                             to: 'os_bankid'
                         }],
+                        defaultCondition: "1=1",
+                        dbSearchFields:[{
+                            emptyText:'输入账户编号或名称',
+                            xtype : "textfield",
+                            name : "search",
+                            getCondition: function(v) {
+                                return "(upper(bk_bankname) like '%"+v.toUpperCase()+"%' or upper(bk_bankcode) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true,
+                            columnWidth : 0.25
+                        }],
                         dbtpls: [{
                             field: 'bk_bankcode',
                             width: 100
@@ -134,7 +148,8 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
                             "flex": 1,
                             "dataIndex": "bk_thisamount",
                             "width": 120,
-                            "xtype": ""
+                            "xtype": "",
+                            align:'right'
                         }, {
                             "text": "建帐日期",
                             "flex": 1,

+ 4 - 2
frontend/saas-web/app/view/money/othspendings/QueryPanelModel.js

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

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

@@ -39,7 +39,8 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         xtype: 'textfield',
         name: 'pb_kind',
         fieldLabel: '单据类型',
-        defaultValue: '付款单'
+        defaultValue: '付款单',
+        readOnly: true
     },  {
         xtype: 'hidden',
         name: 'pb_vendid',
@@ -176,12 +177,6 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         detnoColumn: 'pbd_detno',
         allowEmpty: true,
         deleteDetailUrl: '/api/money/paybalance/deleteDetail2/',
-        tbar: ['->', {
-            xtype:'dbfindtrigger',
-            columnWidth: 1,
-            fieldLabel:'选择源单',
-            name: 'choseSource'
-        }],
         columns: [{
             text: 'ID',
             dataIndex: 'id',

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

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

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

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

@@ -35,7 +35,8 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         xtype: 'textfield',
         name: 'rb_kind',
         fieldLabel: '单据类型',
-        defaultValue: '收款单'
+        defaultValue: '收款单',
+        readOnly: true
     }, {
         xtype: 'hidden',
         name: 'rb_custcode',
@@ -171,12 +172,6 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         storeModel: 'saas.model.money.RecBalance2',
         detnoColumn: 'rbd_detno',
         deleteDetailUrl: '/api/money/recbalance/deleteDetail2/',
-        tbar: ['->', {
-            xtype:'dbfindtrigger',
-            columnWidth: 1,
-            fieldLabel:'选择源单',
-            name: 'choseSource'
-        }],
         columns: [{
             text: 'ID',
             dataIndex: 'id',

+ 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 - 2
frontend/saas-web/app/view/money/recBalance/QueryPanelModel.js

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

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

@@ -144,7 +144,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 allowBlank : false,
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 8,
+                    decimalPrecision: 3,
                     minValue:0
                 },
                 renderer : function(v) {

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

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

@@ -69,11 +69,12 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
     }, {
         xtype: 'multicombo',
         name: 'pu_acceptstatuscode',
-        fieldLabel: '入库状态',
+        fieldLabel: '业务状态',
         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",

+ 30 - 11
frontend/saas-web/app/view/purchase/report/Purchase.js

@@ -11,22 +11,39 @@ Ext.define('saas.view.purchase.report.Purchase', {
     listUrl: '/api/purchase/purchase/list',
     defaultCondition: null,
     reportTitle: '采购明细报表',
-
-    searchItems: [{
+    QueryWidth:0.25,
+    //筛选:供应商、日期(必填)、业务状态			
+    searchItems: [ {
+        xtype: 'dbfindtrigger',
+        name: 'pu_vendname',
+        fieldLabel: '供应商名称',
+        columnWidth: 0.25
+    }, {
         xtype: 'condatefield',
         name: 'pu_date',
         fieldLabel: '单据日期',
-        columnWidth: 0.5
+        columnWidth: 0.25
+    }, {
+        xtype: 'multicombo',
+        name: 'pu_acceptstatuscode',
+        fieldLabel: '业务状态',
+        columnWidth: 0.25,
+        datas: [
+            ["TURNIN", "已入库"],
+            ["UNTURNIN", "未入库"],
+            ["PART2IN", "部分入库"],
+            ["CLOSE", "已关闭"]
+        ]
     }],
 
-    reportColumns: [{
+    reportColumns: [
+    {
         text: 'id',
         dataIndex: 'pu_id',
         hidden: true
     }, {
         text: '采购单号',
         dataIndex: 'pu_code',
-        summaryType: 'count',
         width: 200
     }, {
         text: '供应商编号',
@@ -66,7 +83,8 @@ Ext.define('saas.view.purchase.report.Purchase', {
         dataIndex: 'pr_unit'
     }, {
         text: '采购数量',
-        dataIndex: 'pd_qty'
+        dataIndex: 'pd_qty',
+        summaryType: 'count'
     }, {
         text: '单价',
         dataIndex: 'pd_price'
@@ -75,19 +93,20 @@ Ext.define('saas.view.purchase.report.Purchase', {
         dataIndex: 'pd_taxrate'
     }, {
         text: '金额',
-        dataIndex: 'pd_total'
+        dataIndex: 'pd_total',
+        summaryType: 'count'
     }, {
         text: '不含税单价',
-        dataIndex: 'rbd_remark'
+        dataIndex: 'pd_taxprice'
     }, {
         text: '不含税金额',
-        dataIndex: 'pd_taxprice'
+        dataIndex: 'pd_taxtotal'
     }, {
         text: '收货数量',
-        dataIndex: 'pd_yqty'
+        dataIndex: 'pd_acceptqty'
     }, {
         text: '收货金额',
-        dataIndex: 'pd_total'
+        dataIndex: 'pd_accepttotal'
     }, {
         text: '备注'
     }]

+ 77 - 1
frontend/saas-web/app/view/purchase/report/PurchaseController.js

@@ -1,4 +1,80 @@
 Ext.define('saas.view.purchase.report.PurchaseController', {
     extend: 'saas.view.core.report.ReportPanelController',
-    alias: 'controller.purchase-report-purchase'
+    alias: 'controller.purchase-report-purchase',
+    init: function (form) {
+        this.control({
+            // 供应商编号
+            'dbfindtrigger[name=pu_vendname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'/api/document/vendor/list',
+                        addXtype: 'document-vendor-formpanel',
+                        addTitle: '供应商资料',
+                        dbfinds:[{
+                            from:'ve_code',to:'pu_vendcode'
+                        },{
+                            from:'ve_name',to:'pu_vendname'
+                        }],
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        defaultCondition: "ve_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        dbColumns:[{
+                            "text": "供应商ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
+                        },{
+                            "text": "供应商编号",
+                            "dataIndex": "ve_code",
+                            "width": 200
+                        }, {
+                            "text": "供应商名称",
+                            "dataIndex": "ve_name",
+                            "width": 200
+                        }, {
+                            "text": "供应商类型",
+                            "dataIndex": "ve_type",
+                            "width": 180,
+                            "items": null
+                        }, {
+                            "text": "税率",
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "dataIndex": "ve_bankaccount",
+                            "width": 150
+                        }, {
+                            "text": "开户银行",
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+    }
 });

+ 116 - 0
frontend/saas-web/app/view/purchase/report/PurchasePay.js

@@ -0,0 +1,116 @@
+Ext.define('saas.view.purchase.report.PurchasePay', {
+    extend: 'saas.view.core.report.ReportPanel',
+    xtype: 'purchase-report-purchasepay',
+
+    controller: 'purchase-report-purchasepay',
+    viewModel: 'purchase-report-purchasepay',
+
+    viewName: 'purchase-report-purchasepay',
+//按供应商分组 付款金额合计
+    groupField: 'pu_vendname',
+    listUrl: '/api/money/paybalance/list',
+    defaultCondition: null,
+    reportTitle: '采购付款一览表',
+    QueryWidth:0.25,
+    searchItems: [
+    {
+        xtype: 'dbfindtrigger',
+        name: 'pu_vendname',
+        fieldLabel: '供应商名称',
+        columnWidth: 0.25
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_date',
+        fieldLabel: '单据日期',
+        columnWidth: 0.5
+    }],
+
+    reportColumns: [
+    {
+        text: 'id',
+        dataIndex: 'pb_id',
+        hidden: true
+    }, {
+        text: '付款单号',
+        dataIndex: 'pb_code',
+        width: 200
+    }, {
+        text: '供应商编号',
+        dataIndex: 'pu_vendcode',
+        width: 200
+    }, {
+        text: '供应商名称',
+        dataIndex: 'pu_vendname',
+        width: 200
+    }, {
+        text: '录入人',
+        dataIndex: 'pb_recorder',
+        width: 200
+    }, {
+        text : "日期", 
+        dataIndex : "pb_recorddate", 
+        xtype:'datecolumn'
+    }, {
+        text: '来源单号',
+        dataIndex: 'pbd_slcode',
+        width: 200
+    }, {
+        text: '类型',
+        dataIndex: 'pbd_slkind',
+        width: 200
+    }, {//∑求和
+        text: '采购金额',
+        dataIndex: 'pbd_amount',
+        width: 200,
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        },
+        summaryType: 'sum',
+        summaryRenderer: function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
+    }, {//∑求和
+        text: '本次付款',
+        dataIndex: 'pbd_nowbalance',
+        width: 200,
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        },
+        summaryType: 'sum',
+        summaryRenderer: function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
+    }, {
+        text: '应付余额',
+        dataIndex: 'pb_pbdamount',
+        width: 200,
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        },
+    }, {
+        text: '付款比例',
+        //本次付款/采购金额*100%
+        dataIndex: 'pb_payrate',
+        width: 200
+    }, {
+        text: '备注',
+        dataIndex: 'pd_remark',
+        width: 200
+    }]
+
+});

+ 80 - 0
frontend/saas-web/app/view/purchase/report/PurchasePayController.js

@@ -0,0 +1,80 @@
+Ext.define('saas.view.purchase.report.PurchasePayController', {
+    extend: 'saas.view.core.report.ReportPanelController',
+    alias: 'controller.purchase-report-purchasepay',
+    init: function (form) {
+        this.control({
+            // 供应商编号
+            'dbfindtrigger[name=pu_vendname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'/api/document/vendor/list',
+                        addXtype: 'document-vendor-formpanel',
+                        addTitle: '供应商资料',
+                        dbfinds:[{
+                            from:'ve_code',to:'pu_vendcode'
+                        },{
+                            from:'ve_name',to:'pu_vendname'
+                        }],
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        defaultCondition: "ve_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        dbColumns:[{
+                            "text": "供应商ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
+                        },{
+                            "text": "供应商编号",
+                            "dataIndex": "ve_code",
+                            "width": 200
+                        }, {
+                            "text": "供应商名称",
+                            "dataIndex": "ve_name",
+                            "width": 200
+                        }, {
+                            "text": "供应商类型",
+                            "dataIndex": "ve_type",
+                            "width": 180,
+                            "items": null
+                        }, {
+                            "text": "税率",
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "dataIndex": "ve_bankaccount",
+                            "width": 150
+                        }, {
+                            "text": "开户银行",
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/purchase/report/PurchasePayModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.purchase.report.PurchasePayModel', {
+    extend: 'saas.view.core.report.ReportPanelModel',
+    alias: 'viewmodel.purchase-report-purchasepay'
+});

+ 164 - 0
frontend/saas-web/app/view/sale/report/Sale.js

@@ -0,0 +1,164 @@
+Ext.define('saas.view.sale.report.Sale', {
+    extend: 'saas.view.core.report.ReportPanel',
+    xtype: 'sale-report-sale',
+
+    controller: 'sale-report-sale',
+    viewModel: 'sale-report-sale',
+
+    viewName: 'sale-report-sale',
+
+    groupField: null,
+    listUrl: '/api/sale/sale/list',
+    defaultCondition: null,
+    reportTitle: '销售明细报表',
+    QueryWidth:0.25,
+    searchItems: [
+    {
+        xtype: 'dbfindtrigger',
+        name: 'sa_custname',
+        fieldLabel: '客户名称',
+        columnWidth: 0.25
+    }, {
+        xtype: 'condatefield',
+        name: 'sa_date',
+        fieldLabel: '单据日期',
+        columnWidth: 0.25
+    }, {
+        xtype: 'multicombo',
+        name: 'sa_sendstatuscode',
+        fieldLabel: '业务状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        datas: [
+            ["TURNOUT", "已出库"],
+            ["UNTURNOUT", "未出库"],
+            ["PARTOUT", "部分出库"],
+            ["CLOSE", "已关闭"]
+        ]
+    }],
+
+    reportColumns: [
+    {
+        text: 'id',
+        dataIndex: 'sa_id',
+        hidden: true
+    }, {
+        text: '销售单号',
+        dataIndex: 'sa_code',
+        width: 200
+    }, {
+        text: '客户编号',
+        dataIndex: 'sa_custcode',
+        width: 200
+    }, {
+        text: '客户名称',
+        dataIndex: 'sa_custname',
+        width: 200
+    }, {
+        text: '业务状态',
+        dataIndex: 'sa_status'
+    }, {
+        text: '业务员编号',
+        dataIndex: 'sa_sellercode',
+        hidden:true
+    }, {
+        text: '业务员',
+        dataIndex: 'sa_seller'
+    }, {
+        text: '单据日期',
+        xtype: 'datecolumn',
+        dataIndex: 'sa_date'
+    }, {
+        text: '序号',
+        dataIndex: 'sd_detno'
+    }, {
+        text: '物料编号',
+        dataIndex: 'sd_prodcode'
+    }, {
+        text: '物料名称',
+        dataIndex: 'pr_detail'
+    }, {
+        text: '物料规格',
+        dataIndex: 'pr_spec'
+    }, {
+        text: '品牌',
+        dataIndex: 'pr_brand'
+    }, {
+        text: '单位',
+        dataIndex: 'pr_unit'
+    }, {//∑数量
+        text: '数量',
+        dataIndex: 'sd_qty',
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        },
+        summaryType: 'sum',
+        summaryRenderer: function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
+    }, {
+        text: '单价',
+        dataIndex: 'sd_price',
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
+    }, {
+        text: '税率',
+        dataIndex: 'pd_taxrate'
+    }, {//∑金额
+        text: '金额',
+        dataIndex: 'pd_total',
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        },
+        summaryType: 'sum',
+        summaryRenderer: function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
+    }, {//∑不含税金额
+        text: '不含税金额',
+        dataIndex: 'pd_taxprice',
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        },
+        summaryType: 'sum',
+        summaryRenderer: function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
+    }, {
+        text: '出货数量',
+        dataIndex: 'sd_sendqty',
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length)).fill('0');
+            var format = '0.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
+    }, {
+        text : "备注", 
+        dataIndex : "sd_text1",
+        width : 250 
+    }]
+
+});

+ 107 - 0
frontend/saas-web/app/view/sale/report/SaleController.js

@@ -0,0 +1,107 @@
+Ext.define('saas.view.sale.report.SaleController', {
+    extend: 'saas.view.core.report.ReportPanelController',
+    alias: 'controller.sale-report-sale',
+    init: function (form) {
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=sa_custname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'/api/document/customer/dbfind',
+                        addXtype: 'document-customer-formpanel',
+                        addTitle: '客户资料',
+                        defaultCondition:"cu_statuscode='OPEN'",
+                        dbfinds:[
+                            {
+                                from:'id',to:'sa_custid',ignore:true
+                            },{
+                                from:'cu_code',to:'sa_custcode'
+                            },{
+                                from:'cu_name',to:'sa_custname'
+                            },{
+                                from:'ca_address',to:'sa_toplace'
+                        }],
+                        dbtpls:[{
+                            field:'cu_code',width:100
+                        },{
+                            field:'cu_name',width:100
+                        }],
+                        dbSearchFields:[{
+                            emptyText:'输入客户编号或客户名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        dbColumns:[
+                            {
+                                conditionCode:'id',
+                                "text": "客户ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                conditionCode:'cu_code',
+                                "text": "客户编号",
+                                "flex": 1,
+                                "dataIndex": "cu_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_name',
+                                "text": "客户名称",
+                                "flex": 1,
+                                "dataIndex": "cu_name",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_type',
+                                "text": "客户类型",
+                                "flex": 1,
+                                "dataIndex": "cu_type",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "业务员编号",
+                                "flex": 1,
+                                "dataIndex": "cu_sellercode",
+                                "width": 100
+                            }, {
+                                "text": "业务员",
+                                "flex": 1,
+                                "dataIndex": "cu_sellername",
+                                "width": 100
+                            }, {
+                                "text": "税率",
+                                "flex": 1,
+                                "dataIndex": "cu_taxrate",
+                                "width": 100
+                            }, {
+                                "text": "承付天数",
+                                "flex": 1,
+                                "dataIndex": "cu_promisedays",
+                                "width": 100
+                            }, {
+                                "text": "额度",
+                                "flex": 1,
+                                "dataIndex": "cu_credit",
+                                "width": 100
+                            }, {
+                                "text": "客户地址",
+                                "flex": 1,
+                                "dataIndex": "ca_address",
+                                "width": 250
+                            }]
+                    }) ;   
+                }
+            }
+        });
+    }
+});

+ 7 - 2
frontend/saas-web/app/view/sale/report/SaleIn.js

@@ -11,8 +11,13 @@ Ext.define('saas.view.sale.report.SaleIn', {
     listUrl: '/api/money/recbalance/list',
     defaultCondition: null,
     reportTitle: '销售收款报表',
-
-    searchItems: [{
+    QueryWidth:0.25,
+    searchItems: [{//筛选:客户、日期	
+        xtype: 'dbfindtrigger',
+        name: 'sa_custname',
+        fieldLabel: '客户',
+        columnWidth: 0.25
+    }, {
         xtype: 'condatefield',
         name: 'rb_date',
         fieldLabel: '日期',

+ 4 - 0
frontend/saas-web/app/view/sale/report/SaleModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.sale.report.SaleModel', {
+    extend: 'saas.view.core.report.ReportPanelModel',
+    alias: 'viewmodel.sale-report-sale'
+});

+ 105 - 0
frontend/saas-web/app/view/sale/report/SaleProfit.js

@@ -0,0 +1,105 @@
+Ext.define('saas.view.sale.report.SaleProfit', {
+    extend: 'saas.view.core.report.ReportPanel',
+    xtype: 'sale-report-saleprofit',
+
+    controller: 'sale-report-saleprofit',
+    viewModel: 'sale-report-saleprofit',
+
+    viewName: 'sale-report-saleprofit',
+
+    groupField: null,
+    listUrl: '/api/sale/sale/list',
+    defaultCondition: null,
+    reportTitle: '销售毛利润表',
+//筛选:客户、物料、时间	
+    QueryWidth:0.25, 	
+    searchItems: [{
+        xtype: 'dbfindtrigger',
+        name: 'sa_custname',
+        fieldLabel: '客户',
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'sd_prodcode',
+        fieldLabel: '物料',
+        columnWidth: 0.25
+    }, {
+        xtype: 'condatefield',
+        name: 'sa_custname',
+        fieldLabel: '时间',
+        columnWidth: 0.25
+    }],
+
+    reportColumns: [
+    {
+        text: 'id',
+        dataIndex: 'sa_id',
+        hidden: true
+    }, {
+        text: '客户编号',
+        dataIndex: 'sa_custcode',
+        width: 200
+    }, {
+        text: '客户名称',
+        dataIndex: 'sa_custname',
+        width: 200
+    }, {
+        text: '业务员编号',
+        dataIndex: 'sa_sellercode',
+        hidden:true
+    }, {
+        text: '业务员',
+        dataIndex: 'sa_seller'
+    }, {
+        text: '单据日期',
+        xtype: 'datecolumn',
+        dataIndex: 'sa_date'
+    }, {
+        text: '单据编号',
+        dataIndex: 'pd_inoutno'
+    }, {
+        text: '单据类型',
+        dataIndex: 'pd_piclass'
+    }, {
+        text: '物料类别',
+        dataIndex: 'pr_kind'
+    }, {
+        text: '物料编号',
+        dataIndex: 'pr_code'
+    }, {
+        text: '物料名称',
+        dataIndex: 'pr_detail'
+    }, {
+        text: '物料规格',
+        dataIndex: 'pr_spec'
+    }, {
+        text: '单位',
+        dataIndex: 'pr_unit'
+    }, {
+        text: '数量',
+        dataIndex: 'pd_outqty'
+    }, {
+        text: '单价',
+        dataIndex: 'pd_sendprice'
+    }, {
+        text: '税率%',
+        dataIndex: 'pd_taxrate'
+    }, {
+        text: '含税金额',
+        dataIndex: 'pd_ordertotal'
+    }, {
+        text: '成本金额',
+        dataIndex: 'pd_total'
+    }, {
+        text: '毛利润',
+        dataIndex: 'pd_profit'
+    }, {
+        text: '毛利率%',
+        dataIndex: 'pd_profitpresent'
+    }, {
+        text : "备注", 
+        dataIndex : "pd_remark",
+        width : 250 
+    }]
+
+});

+ 107 - 0
frontend/saas-web/app/view/sale/report/SaleProfitController.js

@@ -0,0 +1,107 @@
+Ext.define('saas.view.sale.report.SaleProfitController', {
+    extend: 'saas.view.core.report.ReportPanelController',
+    alias: 'controller.sale-report-saleprofit',
+    init: function (form) {
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=sa_custname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'/api/document/customer/dbfind',
+                        addXtype: 'document-customer-formpanel',
+                        addTitle: '客户资料',
+                        defaultCondition:"cu_statuscode='OPEN'",
+                        dbfinds:[
+                            {
+                                from:'id',to:'sa_custid',ignore:true
+                            },{
+                                from:'cu_code',to:'sa_custcode'
+                            },{
+                                from:'cu_name',to:'sa_custname'
+                            },{
+                                from:'ca_address',to:'sa_toplace'
+                        }],
+                        dbtpls:[{
+                            field:'cu_code',width:100
+                        },{
+                            field:'cu_name',width:100
+                        }],
+                        dbSearchFields:[{
+                            emptyText:'输入客户编号或客户名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
+                        dbColumns:[
+                            {
+                                conditionCode:'id',
+                                "text": "客户ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                conditionCode:'cu_code',
+                                "text": "客户编号",
+                                "flex": 1,
+                                "dataIndex": "cu_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_name',
+                                "text": "客户名称",
+                                "flex": 1,
+                                "dataIndex": "cu_name",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_type',
+                                "text": "客户类型",
+                                "flex": 1,
+                                "dataIndex": "cu_type",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "业务员编号",
+                                "flex": 1,
+                                "dataIndex": "cu_sellercode",
+                                "width": 100
+                            }, {
+                                "text": "业务员",
+                                "flex": 1,
+                                "dataIndex": "cu_sellername",
+                                "width": 100
+                            }, {
+                                "text": "税率",
+                                "flex": 1,
+                                "dataIndex": "cu_taxrate",
+                                "width": 100
+                            }, {
+                                "text": "承付天数",
+                                "flex": 1,
+                                "dataIndex": "cu_promisedays",
+                                "width": 100
+                            }, {
+                                "text": "额度",
+                                "flex": 1,
+                                "dataIndex": "cu_credit",
+                                "width": 100
+                            }, {
+                                "text": "客户地址",
+                                "flex": 1,
+                                "dataIndex": "ca_address",
+                                "width": 250
+                            }]
+                    }) ;   
+                }
+            }
+        });
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/sale/report/SaleProfitModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.sale.report.SaleProfitModel', {
+    extend: 'saas.view.core.report.ReportPanelModel',
+    alias: 'viewmodel.sale-report-saleprofit'
+});

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

@@ -138,7 +138,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 hidden : true,
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 2
+                    decimalPrecision: 3
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
@@ -160,7 +160,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 width : 120.0,
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 8,
+                    decimalPrecision: 3,
                     minValue:0
                 },
                 renderer : function(v) {

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

+ 0 - 1
frontend/saas-web/app/view/sale/sale/FormPanelModel.js

@@ -1,5 +1,4 @@
 Ext.define('saas.view.sale.sale.FormPanelModel', {
     extend: 'saas.view.core.form.FormPanelModel',
     alias: 'viewmodel.sale-sale-formpanel',
-
 });

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

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

@@ -1,5 +1,8 @@
 Ext.define('saas.view.sale.saleIn.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.sale-salein-querypanel'
+    alias: 'viewmodel.sale-salein-querypanel',
+    data: {
+        closeEnable:false
+    }
 
 });

+ 0 - 1
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -259,7 +259,6 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
     }, {
         xtype : "datefield", 
         name : "pi_recorddate", 
-        
         fieldLabel : "录入日期",
         readOnly:true
     }, {

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

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

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

+ 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
frontend/saas-web/packages/font-saas/resources/fonts/iconfont.eot


File diff suppressed because it is too large
+ 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
frontend/saas-web/packages/font-saas/resources/fonts/iconfont.ttf


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"; }

+ 17 - 4
frontend/saas-web/resources/json/navigation.json

@@ -31,7 +31,9 @@
             "text": "采购明细表",
             "viewType": "purchase-report-purchase"
         }, {
-            "text": "采购付款一览表"
+            "id": "report-purchasepay",
+            "text": "采购付款一览表",
+            "viewType": "purchase-report-purchasepay"
         }]
     }]
 }, {
@@ -63,13 +65,17 @@
     }, {
         "text": "报表",
         "items": [{
-            "text": "销售明细表"
+            "id": "report-sale",
+            "text": "销售明细表",
+            "viewType": "sale-report-sale"
         }, {
             "id": "report-salein",
             "text": "销售收款一览表",
             "viewType": "sale-report-salein"
         }, {
-            "text": "销售利润表"
+            "id": "report-saleprofit",
+            "text": "销售利润表",
+            "viewType": "sale-report-saleprofit"
         }]
     }]
 }, {
@@ -223,7 +229,7 @@
             "viewType": "other-address",
             "leaf": true
         }, {
-            "index":"customer",
+            "config":"customerkind",
             "id":"document-kind",
             "text": "客户类型",
             "viewType": "document-kind",
@@ -234,6 +240,7 @@
             "viewType": "other-productunit",
             "leaf": true
         }, {
+            "config":"productkind",
             "id":"document-kind",
             "text": "物料类型",
             "viewType": "document-kind",
@@ -244,6 +251,7 @@
             "viewType": "other-productbrand",
             "leaf": true
         }, {
+            "config":"inoutkind",
             "id":"document-kind",
             "text": "收支类别",
             "viewType": "document-kind",
@@ -264,6 +272,11 @@
             "text": "系统参数",
             "viewType": "sys-config-formpanel",
             "leaf": true
+        }, {
+            "id":"sys-power-formpanel",
+            "text": "权限设置",
+            "viewType": "sys-power-formpanel",
+            "leaf": true
         }, {
             "id":"sys-messagelog-datalist",
             "text": "操作日志",

Some files were not shown because too many files changed in this diff