Browse Source

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

guq 7 years ago
parent
commit
a35bd61d1f
71 changed files with 780 additions and 374 deletions
  1. 1 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 1 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java
  3. 2 1
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseDetailDTO.java
  4. 1 1
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseListDTO.java
  5. 0 3
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseMapper.java
  6. 0 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchasedetailMapper.java
  7. 2 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseDetail.java
  8. 1 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseList.java
  9. 2 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/ProdInOutService.java
  10. 38 32
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  11. 0 9
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  12. 2 61
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml
  13. 2 2
      applications/purchase/purchase-server/src/main/resources/mapper/PurchasedetailMapper.xml
  14. 2 2
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/ProdInOutController.java
  15. 1 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/ProdInOutService.java
  16. 9 5
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  17. 2 2
      applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml
  18. 5 4
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/ProdInOutController.java
  19. 4 0
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdIODetailMapper.java
  20. 2 2
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/ProdInOutService.java
  21. 51 35
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInOutServiceImpl.java
  22. 14 0
      applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml
  23. 9 4
      frontend/saas-web/Readme.md
  24. 38 7
      frontend/saas-web/app/util/FormUtil.js
  25. 3 5
      frontend/saas-web/app/view/core/base/GridPanel.js
  26. 1 5
      frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js
  27. 0 4
      frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js
  28. 5 2
      frontend/saas-web/app/view/core/form/FormPanel.js
  29. 19 4
      frontend/saas-web/app/view/core/form/FormPanelController.js
  30. 7 7
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  31. 1 1
      frontend/saas-web/app/view/core/query/QueryPanel.js
  32. 1 1
      frontend/saas-web/app/view/core/query/QueryPanelController.js
  33. 41 0
      frontend/saas-web/app/view/document/kind/ChildForm.js
  34. 27 0
      frontend/saas-web/app/view/document/kind/Kind.js
  35. 6 0
      frontend/saas-web/app/view/main/Main.scss
  36. 15 15
      frontend/saas-web/app/view/main/Navigation.js
  37. 1 1
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  38. 1 1
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  39. 1 1
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  40. 1 1
      frontend/saas-web/app/view/money/payBalance/QueryPanel.js
  41. 1 1
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  42. 7 3
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  43. 7 3
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  44. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  45. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  46. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  47. 12 5
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  48. 2 1
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  49. 21 8
      frontend/saas-web/app/view/sale/sale/QueryPanel.js
  50. 17 3
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  51. 2 2
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  52. 10 5
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  53. 3 2
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  54. 4 4
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  55. 43 39
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js
  56. 2 2
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js
  57. 2 2
      frontend/saas-web/app/view/stock/make/QueryPanel.js
  58. 0 8
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  59. 1 1
      frontend/saas-web/app/view/stock/otherIn/FormPanelController.js
  60. 2 2
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  61. 1 9
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  62. 2 2
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js
  63. 212 0
      frontend/saas-web/app/view/sys/finish/DataList.js
  64. 43 14
      frontend/saas-web/app/view/sys/maxnumbers/DataList.js
  65. 10 0
      frontend/saas-web/app/view/sys/maxnumbers/DataListController.js
  66. 4 0
      frontend/saas-web/app/view/sys/maxnumbers/DataListlModel.js
  67. 2 19
      frontend/saas-web/app/view/sys/messagelog/DataList.js
  68. 2 1
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/field/Date.js
  69. 20 0
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/grid/pagtoolbar/Paging.js
  70. 21 2
      frontend/saas-web/overrides/i18n.js
  71. 3 4
      frontend/saas-web/resources/json/navigation.json

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

@@ -40,7 +40,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     SALE_CLOSE(72001, "单据已关闭,无法进行操作"),
     SALE_YQTYBEYONDQTY(72001, "明细行已转数量大于数量"),
     SALE_NULL_BILL(72002, "单据不存在或者明细为空"),
-    SALEOUT_ALL_TURNIN(72003, "该销售出货单已全部转退货,无法转销售退货单"),
+    SALEOUT_ALL_TURNIN(72003, "该出货单已全部转退货,无法转销售退货单"),
     SALEOUT_POSTSTATUS_ERROR(72004,"当前单据状态无法进行此操作。"),
     SALEOUT_POST_ERROR(72005,""),
     //资金

+ 1 - 1
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/BillCodeSeq.java

@@ -22,7 +22,7 @@ public enum  BillCodeSeq {
 
     SALE("销售订单", "Sale"),
 
-    SALEOUT("销售出货单", "SaleOut"),
+    SALEOUT("出货单", "SaleOut"),
 
     SALEIN("销售退货单", "SaleIn"),
 

+ 2 - 1
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseDetailDTO.java

@@ -5,6 +5,7 @@ import com.usoftchina.saas.document.dto.ProductDTO;
 import lombok.Data;
 
 import java.io.Serializable;
+import java.util.Date;
 
 /**
  * @author yingp
@@ -37,7 +38,7 @@ public class PurchaseDetailDTO extends CommonBaseDTO implements Serializable{
 
     private Double pd_acceptqty;
 
-    private Double pd_delivery;
+    private Date pd_delivery;
 
     private String pd_salecode;
 

+ 1 - 1
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseListDTO.java

@@ -94,7 +94,7 @@ public class PurchaseListDTO extends CommonBaseDTO implements Serializable {
 
     private Double pd_acceptqty;
 
-    private Double pd_delivery;
+    private Date pd_delivery;
 
     private String pd_salecode;
 

+ 0 - 3
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseMapper.java

@@ -10,9 +10,6 @@ import java.util.List;
 
 public interface PurchaseMapper extends CommonBaseMapper<Purchase>{
 
-
-    int insert(Purchase record);
-
     int insertSelective(Purchase record);
 
     Purchase selectByPrimaryKey(Long id);

+ 0 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchasedetailMapper.java

@@ -9,8 +9,6 @@ import java.util.List;
 public interface PurchasedetailMapper extends CommonBaseMapper<Purchase> {
     int deleteByPrimaryKey(Integer pdId);
 
-    int insert(PurchaseDetail record);
-
     int insertSelective(PurchaseDetail record);
 
     PurchaseDetail selectByPrimaryKey(Integer pdId);

+ 2 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseDetail.java

@@ -5,6 +5,7 @@ import com.usoftchina.saas.document.dto.ProductDTO;
 import lombok.Data;
 
 import java.io.Serializable;
+import java.util.Date;
 
 @Data
 public class PurchaseDetail extends CommonBaseEntity implements Serializable {
@@ -33,7 +34,7 @@ public class PurchaseDetail extends CommonBaseEntity implements Serializable {
 
     private Double pd_acceptqty;
 
-    private Double pd_delivery;
+    private Date pd_delivery;
 
     private String pd_salecode;
 

+ 1 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseList.java

@@ -95,7 +95,7 @@ public class PurchaseList extends CommonBaseEntity implements Serializable {
 
     private Double pd_acceptqty;
 
-    private Double pd_delivery;
+    private Date pd_delivery;
 
     private String pd_salecode;
 

+ 2 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/ProdInOutService.java

@@ -47,7 +47,7 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
      */
     DocBaseDTO audit(ProdInOutFormDTO formData);
 
-    void batchAudit(BatchDealBaseDTO baseDTOs);
+    String batchAudit(BatchDealBaseDTO baseDTOs);
 
     /**
      * 反审核出入库单
@@ -55,7 +55,7 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
      */
     void unAudit(Long id);
 
-    void batchUnAudit(BatchDealBaseDTO baseDTOs);
+    String batchUnAudit(BatchDealBaseDTO baseDTOs);
 
     void deleteItem(Long id);
 

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

@@ -232,91 +232,97 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 baseDTO = saveFormData(formData);
                 id = baseDTO.getId();
             }
-            String res = singleAudit(formData.getMain());
-            if(res!=null){
-                new BizException(501,res);
-            }
+            singleAudit(formData.getMain());
         }
         baseDTO.setId(id);
         return baseDTO;
     }
 
-    private String singleAudit(ProdInOutDTO prodInOutDTO) {
+    private void singleAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class= prodInOutDTO.getPi_class();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
-        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("companyId",BaseContextHolder.getCompanyId());
         map.put("result","");
-        warehouseApi.post(map);
-        Object result =  map.get("result");
-        if(result!=null){
-            return result.toString();
+        Result res = warehouseApi.post(map);
+        Object result =  res.getData();
+        if(!StringUtils.isEmpty(result)){
+            throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
         }else{
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             //日志
             messageLogService.audit(docBaseDTO);
-            return "";
         }
     }
 
     @Override
-    public void batchAudit(BatchDealBaseDTO baseDTOs) {
+    public String batchAudit(BatchDealBaseDTO baseDTOs) {
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
                 baseDTOs.getBaseDTOs().size() == 0) {
-            return;
+            return "没有可审核单据。";
         }
+        StringBuffer errorMsg = new StringBuffer();
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
-            Long id =  base.getId();
-            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
-            ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
-            singleAudit(prodInOutDTO);
+            try {
+                Long id =  base.getId();
+                ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+                ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
+                singleAudit(prodInOutDTO);
+            } catch (Exception e) {
+                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+            }
         }
+        return errorMsg.toString();
     }
 
     @Override
     public void unAudit(Long id) {
         ProdInOut prodInOut =checkAndReturnOrder(id);
         ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut, ProdInOutDTO.class);
-        String res =  singleUnAudit(prodInOutDTO);
-
+        singleUnAudit(prodInOutDTO);
     }
 
-    private String singleUnAudit(ProdInOutDTO prodInOutDTO) {
+    private void singleUnAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class= prodInOutDTO.getPi_class();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
-        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("companyId",BaseContextHolder.getCompanyId());
         map.put("result","");
-        warehouseApi.unPost(map);
-        Object result =  map.get("result");
-        if(result!=null){
-            return result.toString();
+        Result res = warehouseApi.unPost(map);
+        Object result = res.getData();
+        if(!StringUtils.isEmpty(result)){
+            throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
         }else{
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             //日志
             messageLogService.unAudit(docBaseDTO);
-            return "";
         }
     }
 
     @Override
-    public void batchUnAudit(BatchDealBaseDTO baseDTOs) {
+    public String batchUnAudit(BatchDealBaseDTO baseDTOs) {
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
                 baseDTOs.getBaseDTOs().size() == 0) {
-            return;
+            return "无可反审核单据。";
         }
+        StringBuffer errorMsg = new StringBuffer();
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
-            Long id =  base.getId();
-            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
-            ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
-            singleUnAudit(prodInOutDTO);
+            try {
+                Long id =  base.getId();
+                ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+                ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
+                singleUnAudit(prodInOutDTO);
+            }catch (Exception e) {
+                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+            }
         }
+        return errorMsg.toString();
     }
 
     @Override

+ 0 - 9
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java

@@ -331,9 +331,6 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         //检查转单状态
         String acceptstatus = purchase.getPu_acceptstatuscode();
 
-        if ("TURNIN".equals(acceptstatus)){
-            return Result.error(ExceptionCode.TURNIN_EXIST);
-        }
         if ("CLOSED".equals(acceptstatus)){
             return Result.error(ExceptionCode.CLOSED_EXIST);
         }
@@ -403,16 +400,10 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                 purchasedetailMapper.updateByPrimaryKeySelective(purchaseDetail);
             }
         }
-        //更新主表入库状态
-        purchase.setPu_acceptstatus("已入库");
-        purchase.setPu_acceptstatuscode("TURNIN");
-
         DocBaseDTO baseDTO = new DocBaseDTO();
         baseDTO.setId(pi_id);
         baseDTO.setCode(piInoutno);
         baseDTO.setName("采购验收单");
-        //更新存在字段
-        int affect = getMapper().updateByPrimaryKeySelective(purchase);
         return Result.success(baseDTO);
     }
 

+ 2 - 61
applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml

@@ -43,7 +43,7 @@
         <result column="PD_TOTAL" property="pd_total" jdbcType="DOUBLE" />
         <result column="PD_TAXTOTAL" property="pd_taxtotal" jdbcType="DOUBLE" />
         <result column="PD_ACCEPTQTY" property="pd_acceptqty" jdbcType="DOUBLE" />
-        <result column="PD_DELIVERY" property="pd_delivery" jdbcType="DOUBLE" />
+        <result column="PD_DELIVERY" property="pd_delivery" jdbcType="TIMESTAMP" />
         <result column="PD_SALECODE" property="pd_salecode" jdbcType="VARCHAR" />
         <result column="PD_SALEDETNO" property="pd_saledetno" jdbcType="INTEGER" />
         <result column="PD_SDID" property="pd_sdid" jdbcType="INTEGER" />
@@ -80,64 +80,5 @@
         </where>
         order by pu_id
     </select>
-    <insert id="batchInsert" parameterType="java.util.List" >
-        insert into purchasedetail ( PD_PUID, PD_CODE,
-        PD_DETNO, PD_PRODID, PD_PRODCODE,
-        PD_UNIT, PD_QTY, PD_PRICE,
-        PD_TOTAL, PD_TAXTOTAL, PD_ACCEPTQTY,
-        PD_DELIVERY, PD_SALECODE, PD_SALEDETNO,
-        PD_SDID, companyId, updaterId,
-        updateTime, pd_text1, pd_text2,
-        pd_text3, pd_text4, pd_text5,
-        pd_yqty)
-        values
-        <foreach collection="list" item="item" index="index" open="" close="" separator=",">
-            (
-            #{item.pdPuid,jdbcType=INTEGER}, #{item.pdCode,jdbcType=VARCHAR},
-            #{item.pdDetno,jdbcType=INTEGER}, #{item.pdProdid,jdbcType=INTEGER}, #{item.pdProdcode,jdbcType=VARCHAR},
-            #{item.pdUnit,jdbcType=VARCHAR}, #{item.pdQty,jdbcType=DOUBLE}, #{item.pdPrice,jdbcType=DOUBLE},
-            #{item.pdTotal,jdbcType=DOUBLE}, #{item.pdTaxtotal,jdbcType=DOUBLE}, #{item.pdAcceptqty,jdbcType=DOUBLE},
-            #{item.pdDelivery,jdbcType=DOUBLE}, #{item.pdSalecode,jdbcType=VARCHAR}, #{item.pdSaledetno,jdbcType=INTEGER},
-            #{item.pdSdid,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER},
-            #{item.updateTime,jdbcType=TIMESTAMP}, #{item.pdText1,jdbcType=VARCHAR}, #{item.pdText2,jdbcType=VARCHAR},
-            #{item.pdText3,jdbcType=VARCHAR}, #{item.pdText4,jdbcType=VARCHAR}, #{item.pdText5,jdbcType=VARCHAR},
-            #{item.pdYqty,jdbcType=DOUBLE}
-            )
-        </foreach>
-    </insert>
-    <update id="batchUpdate" parameterType="com.usoftchina.saas.purchase.po.PurchaseDetail" >
-        <foreach collection="list" item="item" index="index" open="" close="" separator=";">
-            update purchasedetail <set>
-            PD_PUID = #{item.pdPuid},
-            PD_CODE = #{item.pdCode},
-            PD_DETNO = #{item.pdDetno},
-            PD_PRODID = #{item.pdProdid},
-            PD_PRODCODE = #{item.pdProdcode},
-            PD_UNIT = #{item.pdUnit},
-            PD_QTY = #{item.pdQty},
-            PD_PRICE = #{item.pdPrice},
-            PD_TOTAL = #{item.pdTotal},
-            PD_TAXTOTAL = #{item.pdTaxtotal},
-            PD_ACCEPTQTY = #{item.pdAcceptqty},
-            PD_DELIVERY = #{item.pdDelivery},
-            PD_SALECODE = #{item.pdSalecode},
-            PD_SALEDETNO = #{item.pdSaledetno},
-            PD_SDID = #{item.pdSdid},
-            companyId = #{item.companyId},
-            updaterId = #{item.updaterId},
-            updateTime = #{item.updateTime},
-            pd_text1 = #{item.pdText1},
-            pd_text2 = #{item.pdText2},
-            pd_text3 = #{item.pdText3},
-            pd_text4 = #{item.pdText4},
-            pd_text5 = #{item.pdText5},
-            pd_yqty = #{item.pdYqty}
-        </set>
-            where PD_ID = #{item.id,jdbcType=INTEGER}
-        </foreach>
-    </update>
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
-        delete from purchasedetail
-        where PD_ID = #{id}
-    </delete>
+
 </mapper>

+ 2 - 2
applications/purchase/purchase-server/src/main/resources/mapper/PurchasedetailMapper.xml

@@ -15,7 +15,7 @@
     <result column="PD_TAXRATE" property="pd_taxrate" jdbcType="DOUBLE" />
     <result column="PD_TAXTOTAL" property="pd_taxtotal" jdbcType="DOUBLE" />
     <result column="PD_ACCEPTQTY" property="pd_acceptqty" jdbcType="DOUBLE" />
-    <result column="PD_DELIVERY" property="pd_delivery" jdbcType="DOUBLE" />
+    <result column="PD_DELIVERY" property="pd_delivery" jdbcType="TIMESTAMP" />
     <result column="PD_SALECODE" property="pd_salecode" jdbcType="VARCHAR" />
     <result column="PD_SALEDETNO" property="pd_saledetno" jdbcType="INTEGER" />
     <result column="PD_SDID" property="pd_sdid" jdbcType="INTEGER" />
@@ -212,7 +212,7 @@
         #{pdAcceptqty,jdbcType=DOUBLE},
       </if>
       <if test="pdDelivery != null" >
-        #{pdDelivery,jdbcType=DOUBLE},
+        #{pdDelivery,jdbcType=TIMESTAMP},
       </if>
       <if test="pdSalecode != null" >
         #{pdSalecode,jdbcType=VARCHAR},

+ 2 - 2
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/ProdInOutController.java

@@ -149,8 +149,8 @@ public class ProdInOutController {
 
     @PostMapping("/turnProdIn/{id}")
     public Result turnProdin(@PathVariable("id") Long id){
-        prodInOutService.turnProdin(id);
-        return Result.success();
+        DocBaseDTO baseDTO  = prodInOutService.turnProdin(id);
+        return Result.success(baseDTO);
     };
 
     @PostMapping("/close/{id}")

+ 1 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/ProdInOutService.java

@@ -118,5 +118,5 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
      * 出库单转退货单
      * @param id
      */
-    Result turnProdin(Long id);
+    DocBaseDTO turnProdin(Long id);
 }

+ 9 - 5
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java

@@ -363,7 +363,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     }
 
     @Override
-    public Result turnProdin(Long id) {
+    public DocBaseDTO turnProdin(Long id) {
         Integer count=0;
         double pdOutqty=0;
         double pdYqty=0;
@@ -389,7 +389,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         }
         //判断可转数
         if (count==0) {
-            return Result.error(ExceptionCode.TURNINNUM_NOT_EXIST);
+            throw  new BizException(ExceptionCode.TURNINNUM_NOT_EXIST);
         }
         //插入销售退货单主表
         ProdInOut targetPi = new ProdInOut();
@@ -455,7 +455,11 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 prodIODetailMapper.updateByPrimaryKeySelective(sourcePid);
             }
         }
-        return Result.success();
+
+        //日志记录
+        DocBaseDTO baseDTO = new DocBaseDTO(pi_id, piInoutno, BillCodeSeq.SALEIN.getCaller());
+        //messageLogService.customizeLog(baseDTO, Operation.);
+        return baseDTO;
 
     }
 
@@ -548,7 +552,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         Integer count = "0".equals(String.valueOf(id)) ? prodInOutMapper.validateCodeWhenInsert(code,pi_class) :
                 prodInOutMapper.validateCodeWhenUpdate(code, id);
         String caller ="";
-        if(pi_class.equals("销售出货单")){
+        if(pi_class.equals("出货单")){
             caller = BillCodeSeq.SALEOUT.getCaller();
         }else {//销售退货单
             caller = BillCodeSeq.SALEIN.getCaller();
@@ -580,7 +584,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     private void setTotal(ProdInOut prodInOut ) {
         String pi_class = prodInOut.getPi_class();
         Long id = prodInOut.getId();
-        if(BillCodeSeq.SALEOUT.getName().equals(pi_class)){//销售出货单
+        if(BillCodeSeq.SALEOUT.getName().equals(pi_class)){//出货单
             //更新明细
             prodIODetailMapper.updatePDSaleOut(id);
             //更新主表

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

@@ -746,13 +746,13 @@ update prodiodetail a
           and pd_piid=#{id}  GROUP BY pd_ioid ) b
           where IFNULL(b.pd_ioid ,0)= a.pd_id
      ),0)
-where a.pd_id in (select pd_ioid from prodiodetail where pd_piid=#{id} and pi_class='销售出货单')
+where a.pd_id in (select pd_ioid from prodiodetail where pd_piid=#{id} and pd_piclass='出货单')
   </update>
   <update id="updateSaleYqty" parameterType="long">
 
     update saledetail a set a.sd_yqty =IFNULL( ( select b.pd_outqty from (
     select pd_sdid,sum(pd_outqty) pd_outqty from prodiodetail left join
-    prodinout on pd_piid = pi_id where pd_piclass='销售出货单' and pi_said=#{id}
+    prodinout on pd_piid = pi_id where pd_piclass='出货单' and pi_said=#{id}
     GROUP BY pd_sdid) b where IFNULL(b.pd_sdid ,0) = a.sd_id ),0) where a.sd_said =#{id}
   </update>
 

+ 5 - 4
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/controller/ProdInOutController.java

@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
  * Created by zdw
  * 2018-10-17 11:41.
  */
+@CrossOrigin
 @RestController
 @RequestMapping("/prodinout")
 public class ProdInOutController {
@@ -130,8 +131,8 @@ public class ProdInOutController {
      */
     @PostMapping("/batchAudit")
     public Result batchAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        prodInOutService.batchAudit(baseDTOs);
-        return Result.success();
+        String res = prodInOutService.batchAudit(baseDTOs);
+        return Result.success(res);
     }
 
     /**
@@ -142,8 +143,8 @@ public class ProdInOutController {
      */
     @PostMapping("/batchUnAudit")
     public Result batchUnAudit(@RequestBody BatchDealBaseDTO baseDTOs) {
-        prodInOutService.batchUnAudit(baseDTOs);
-        return Result.success();
+        String res = prodInOutService.batchUnAudit(baseDTOs);
+        return Result.success(res);
     }
 
     /**

+ 4 - 0
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/ProdIODetailMapper.java

@@ -30,4 +30,8 @@ public interface ProdIODetailMapper extends CommonBaseMapper<ProdIODetail> {
     List<ProdIODetail> selectByFK(Long id);
 
     void deleteByFK(Long id);
+
+    void calcProdIn(Long pi_id);
+
+    void calcProdOut(Long pi_id);
 }

+ 2 - 2
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/ProdInOutService.java

@@ -47,7 +47,7 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
      */
     DocBaseDTO audit(ProdInOutFormDTO formData);
 
-    void batchAudit(BatchDealBaseDTO baseDTOs);
+    String batchAudit(BatchDealBaseDTO baseDTOs);
 
     /**
      * 反审核出入库单
@@ -55,7 +55,7 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
      */
     void unAudit(Long id);
 
-    void batchUnAudit(BatchDealBaseDTO baseDTOs);
+    String batchUnAudit(BatchDealBaseDTO baseDTOs);
 
     void deleteItem(Long id);
 

+ 51 - 35
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInOutServiceImpl.java

@@ -2,6 +2,7 @@ package com.usoftchina.saas.storage.service.impl;
 
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
 import com.usoftchina.saas.commons.api.MaxnumberService;
 import com.usoftchina.saas.commons.api.MessageLogService;
@@ -185,10 +186,10 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             prodIODetailMapper.batchUpdate(updateDetails);
         }
         baseDTO = getBaseDTOById(pi_id,pi_class,pi_inoutno);
-        //更新已转数
+        //计算金额,未税单价,未税金额等
+        calcProdInout(pi_id,pi_class);
         //日志记录
         messageLogService.update(baseDTO);
-
         return baseDTO;
     }
 
@@ -220,95 +221,101 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         DocBaseDTO baseDTO = new DocBaseDTO();
         if (null != formData) {
             id = formData.getMain().getId();
-            if (StringUtils.isEmpty(id)) {
+            if (StringUtils.isEmpty(id)|| "0".equals(String.valueOf(id))) {
                 baseDTO = saveFormData(formData);
                 id = baseDTO.getId();
             }
-            String res = singleAudit(formData.getMain());
-            if(res!=null){
-                new BizException(501,res);
-            }
+            singleAudit(formData.getMain());
         }
         baseDTO.setId(id);
         return baseDTO;
     }
 
-    private String singleAudit(ProdInOutDTO prodInOutDTO) {
+    private void singleAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class= prodInOutDTO.getPi_class();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
-        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("companyId",BaseContextHolder.getCompanyId());
         map.put("result","");
-        warehouseApi.post(map);
-        Object result =  map.get("result");
-        if(result!=null){
-            return result.toString();
+        Result res = warehouseApi.post(map);
+        Object result =  res.getData();
+        if(!StringUtils.isEmpty(result)){
+            throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
         }else{
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             //日志
             messageLogService.audit(docBaseDTO);
-            return "";
         }
     }
 
     @Override
-    public void batchAudit(BatchDealBaseDTO baseDTOs) {
+    public String  batchAudit(BatchDealBaseDTO baseDTOs) {
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
                 baseDTOs.getBaseDTOs().size() == 0) {
-            return;
+            return "没有可审核单据。";
         }
+        StringBuffer errorMsg = new StringBuffer();
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
-            Long id =  base.getId();
-            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
-            ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
-            singleAudit(prodInOutDTO);
+            try {
+                Long id =  base.getId();
+                ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+                ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
+                singleAudit(prodInOutDTO);
+            } catch (Exception e){
+                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+            }
         }
+        return errorMsg.toString();
     }
 
     @Override
     public void unAudit(Long id) {
         ProdInOut prodInOut =checkAndReturnOrder(id);
         ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut, ProdInOutDTO.class);
-        String res =  singleUnAudit(prodInOutDTO);
-
+        singleUnAudit(prodInOutDTO);
     }
 
-    private String singleUnAudit(ProdInOutDTO prodInOutDTO) {
+    private void singleUnAudit(ProdInOutDTO prodInOutDTO) {
         String pi_class= prodInOutDTO.getPi_class();
         Map<String, Object> map = new HashMap<String, Object>();
         map.put("inoutNo",prodInOutDTO.getPi_inoutno() );
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
-        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("companyId",BaseContextHolder.getCompanyId());
         map.put("result","");
-        warehouseApi.unPost(map);
-        Object result =  map.get("result");
-        if(result!=null){
-            return result.toString();
+        Result res = warehouseApi.unPost(map);
+        Object result =  res.getData();
+        if(!StringUtils.isEmpty(result)){
+            throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
         }else{
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,prodInOutDTO.getPi_inoutno());
             //日志
             messageLogService.unAudit(docBaseDTO);
-            return "";
         }
     }
 
     @Override
-    public void batchUnAudit(BatchDealBaseDTO baseDTOs) {
+    public String batchUnAudit(BatchDealBaseDTO baseDTOs) {
         if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
                 baseDTOs.getBaseDTOs().size() == 0) {
-            return;
+            return "无可反审核单据。";
         }
+        StringBuffer errorMsg = new StringBuffer();
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
-            Long id =  base.getId();
-            ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
-            ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
-            singleUnAudit(prodInOutDTO);
+            try {
+                Long id =  base.getId();
+                ProdInOut prodInOut = getMapper().selectByPrimaryKey(id);
+                ProdInOutDTO prodInOutDTO = BeanMapper.map(prodInOut,ProdInOutDTO.class);
+                singleUnAudit(prodInOutDTO);
+            }catch (Exception e) {
+                errorMsg.append("编号:" + base.getCode() + "处理失败," + e.getMessage());
+            }
         }
+        return errorMsg.toString();
     }
 
     @Override
@@ -455,4 +462,13 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         }
         return prodInOut;
     }
+
+    private void calcProdInout(Long pi_id, String pi_class) {
+        if ("其它入库单".equals(pi_class)) {
+            prodIODetailMapper.calcProdIn(pi_id);
+        } else if ("其它出库单".equals(pi_class)) {
+            prodIODetailMapper.calcProdOut(pi_id);
+        }
+    }
+
 }

+ 14 - 0
applications/storage/storage-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -739,4 +739,18 @@ where a.pd_piid = (select pi_id from prodinout where pi_puid=#{id,jdbcType=INTEG
     where pd_piid = #{id,jdbcType=INTEGER}
   </delete>
 
+  <update id="calcProdIn">
+    update prodiodetail set pd_netprice = pd_orderprice/(1+pd_taxrate/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_total = pd_orderprice*pd_inqty,pd_nettotal = pd_netprice*pd_inqty where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+  </update>
+
+  <update id="calcProdOut">
+    update prodiodetail set pd_netprice = pd_orderprice/(1+pd_taxrate/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodiodetail set pd_total = pd_orderprice*pd_outqty,pd_nettotal = pd_netprice*pd_outqty where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = (select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_nettotal = (select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ) where pi_id = #{pi_id,jdbcType=INTEGER};
+  </update>
+
 </mapper>

+ 9 - 4
frontend/saas-web/Readme.md

@@ -91,12 +91,13 @@ viewModel: view.core.form.FormPanelModel
 | --- | --- | --- | --- |
 | storeModel | grid model | √ | "saas.model.purchase.purchasedetail" |
 | detnoColumn | 序号列,配置该项后无需再columns定义序号列 | √ | "pud_detno" |
-| columns[i].ignore | 是否忽略,为真时在调用保存方法时不会取到该列值 | x | true |
 | deleteDetailUrl | 删除明细接口 | √ | "/api/purchase/purchase/deleteItem" |
-| allowBlank | 是否必填列 | x | true |
-| isValid | 自定义校验规则,传入value,返回boolean | x | function(v) { return v > 10; } |
+| columns[i].ignore | 是否忽略,为真时在调用保存方法时不会取到该列值 | x | true |
+| columns[i].allowBlank | 是否必填列 | x | true |
+| columns[i].isValid | 自定义校验规则,传入value,返回boolean | x | function(v) { return v > 10; } |
+| columns[i].defaultValue | 默认值,只对设置了dataIndex的column生效 | x | 40 |
 - 需要根据columns在models文件夹下添加storeModel对应的Model
-
+- allowBlan和isValid的校验只会校验dirty数据
 ---
 
 ## 查询列表配置
@@ -162,5 +163,9 @@ deleteDetailUrl 配置调整 formpanel.form->formpanel.detailGridField
 
 从表必填配置说明allowBlamk、isValid
 
+- 2018-10-31 18:00:55
+
+从表默认值配置说明
+
 
 

+ 38 - 7
frontend/saas-web/app/util/FormUtil.js

@@ -63,14 +63,19 @@ Ext.define('saas.util.FormUtil', {
                                 return c.dataIndex && !c.ignore;
                             }).map(function(c) {
                                 return c.dataIndex
-                            });
+                            }),
+                            defaultValueColumns = {};
 
                             Ext.Array.each(columns, function(c) {
 
+                                if(c.dataIndex && c.defaultValue) {
+                                    defaultValueColumns[c.dataIndex] = c.defaultValue;
+                                }
 
                                 // 不可锁定
                                 Ext.applyIf(c, {
-                                    lockable: false
+                                    lockable: false,
+                                    width: 120
                                 });
 
                                 //必填
@@ -102,6 +107,10 @@ Ext.define('saas.util.FormUtil', {
                                 }
                             });
 
+                            columns.push({
+                                flex: 1
+                            });
+
                             cnames.push(item.detnoColumn);
 
                             formModel.set('detail' + index + '.detailBindFields', cnames);
@@ -110,7 +119,17 @@ Ext.define('saas.util.FormUtil', {
                             };     
                             formModel.set('detail' + index + '.detailStore', Ext.create('Ext.data.Store', {
                                 model:item.storeModel,
-                                data: []
+                                data: [],
+                                listeners: {
+                                    add: function(store, records, index, eOpts) {
+                                        Ext.Array.each(records, function(r) {
+                                            for(k in defaultValueColumns) {
+                                                r.set(k, defaultValueColumns[k]);
+                                            }
+                                            r.commit();
+                                        });
+                                    }
+                                }
                             }));
 
                             form.detailCount++;
@@ -181,16 +200,28 @@ Ext.define('saas.util.FormUtil', {
                     var viewModel = form.getViewModel();
                     var detailGrids = form.query('detailGridField');
 
-                    Ext.Array.each(detailGrids, function(grid) {
-                        grid.add10EmptyRow();
-                    });
                     if(code){
                         var o = {};
                         o[form._codeField] = code;
 
-                        form.setFormData({
+                        var formData = {
                             main: o
+                        };
+                        Ext.Array.each(detailGrids, function(grid, index) {
+                            var detno = 0;
+                            var detnoColumn = grid.detnoColumn;
+                            var datas = [];
+                            
+                            Ext.Array.each(new Array(3), function() {
+                                detno += 1;
+                                var data = {};
+                                data[detnoColumn] = detno;
+                                datas.push(data);
+                            })
+                            formData['detail' + index] = datas;
                         });
+
+                        form.setFormData(formData);
                     }
                 }
             }).catch(function() {

+ 3 - 5
frontend/saas-web/app/view/core/base/GridPanel.js

@@ -80,6 +80,7 @@ Ext.define('saas.view.core.base.GridPanel', {
                         text: '导入',
                         handler: me.onImport,
                         menu: {
+                            cls:'x-query-menu',
                             width: 80,
                             items: [{
                                 text:'导出',
@@ -100,6 +101,7 @@ Ext.define('saas.view.core.base.GridPanel', {
                             me.onVastDeal(form._batchCloseUrl,'CLOSE');
                         },
                         menu: {
+                            cls:'x-query-menu',
                             width: 80,
                             items: [{
                                 text:'启用',
@@ -128,11 +130,7 @@ Ext.define('saas.view.core.base.GridPanel', {
                     xtype: 'pagingtoolbar',
                     dock: 'bottom',
                     displayInfo: true,
-                    emptyMsg: "暂无数据",
-                    store: me.store,
-                    displayMsg: '显示{0}到{1}条数据,共有{2}条',
-                    beforePageText: "当前第",
-                    afterPageText: "页,共{0}页"
+                    store: me.store
                 }]
             });
         }

+ 1 - 5
frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js

@@ -73,11 +73,7 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
                     xtype: 'pagingtoolbar',
                     dock: 'bottom',
                     displayInfo: true,
-                    emptyMsg: "暂无数据",
-                    store: me.store,
-                    displayMsg: '显示{0}到{1}条数据,共有{2}条',
-                    beforePageText: "当前第",
-                    afterPageText: "页,共{0}页"
+                    store: me.store
                 }]
             });
         }

+ 0 - 4
frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js

@@ -126,11 +126,7 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
                     xtype: 'pagingtoolbar',
                     dock: 'bottom',
                     displayInfo: true,
-                    emptyMsg: "暂无数据",
                     store: me.store,
-                    displayMsg: '显示{0}到{1}条数据,共有{2}条',
-                    beforePageText: "当前第",
-                    afterPageText: "页,共{0}页",
                     items:[{
                         xtype:'checkbox',
                         id:'showSelectRecord',

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

@@ -95,13 +95,16 @@ Ext.define('saas.view.core.form.FormPanel', {
                     cls: 'x-formpanel-btn-orange',
                     xtype: 'button',
                     text: '新增',
+                    bind: {
+                        hidden: '{!id}'
+                    },
                     handler: 'add'
                 }, {
                     xtype: 'button',
                     text: '保存',
                     handler: 'onSave',
                     bind: {
-                        disabled: '{!base.valid}'
+                        disabled: '{!base.valid || '+ me._statusCodeField + ' == "AUDITED" || ' + me._statusCodeField + ' == "OPEN"}'
                     }
                 }, {
                     xtype: 'button',
@@ -245,7 +248,7 @@ Ext.define('saas.view.core.form.FormPanel', {
                 store = detail.detailStore;
 
             if (detailData) {
-                store.loadData(detailData);
+                store.add(detailData);
             }
         }
 

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

@@ -17,8 +17,8 @@ Ext.define('saas.view.core.form.FormPanelController', {
 
     add: function(){
         var form = this.getView();
-        var id = form.xtype + '_add';
-        openTab(form.xtype,'新增' + form._title,id);
+        var id = form.xtype + '-add';
+        openTab(form.xtype,'新增' + form._title, id);
     },
     
     delete: function(){
@@ -95,9 +95,16 @@ Ext.define('saas.view.core.form.FormPanelController', {
         })
         .then(function(localJson) {
             if(localJson.success){
-                form.initId = localJson.data.id;
+                var id = localJson.data.id;
+                var code = localJson.data.code;
+                form.initId = id;
                 form.FormUtil.loadData(form);
                 showToast('保存成功');
+
+                var newId = form.xtype + '-' + id;
+                var newTitle = form._title + '(' + code + ')';
+
+                refreshTabTitle(newId, newTitle);
             }
         })
         .catch(function(res) {
@@ -149,7 +156,15 @@ Ext.define('saas.view.core.form.FormPanelController', {
             if(localJson.success){
                 // 未保存直接审核会返回id
                 if(localJson.data) {
-                    form.initId = localJson.data.id;
+                    var id = localJson.data.id;
+                    var code = localJson.data.code;
+                    
+                    form.initId = id;
+
+                    var newId = form.xtype + '-' + id;
+                    var newTitle = form._title + '(' + code + ')';
+
+                    refreshTabTitle(newId, newTitle);
                 }
                 form.FormUtil.loadData(form);
                 form.setEditable(false);

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

@@ -122,6 +122,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                     xtype: 'button',
                     handler: me.onAudit,
                     menu: {
+                        cls:'x-query-menu',
                         items: [{
                             text:'反审核',
                             handler:function(){
@@ -138,6 +139,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                     text: '打印',
                     handler: me.onPrint,
                     menu: {
+                        cls:'x-query-menu',
                         width: 80,
                         items: [{
                             text:'设置',
@@ -155,6 +157,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                     text: '导入',
                     handler: me.onImport,
                     menu: {
+                        cls:'x-query-menu',
                         width: 80,
                         items: [{
                             text:'导出',
@@ -172,6 +175,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                     text: '关闭',
                     handler: me.onCloseOrder,
                     menu: {
+                        cls:'x-query-menu',
                         width: 80,
                         items: [{
                             text:'启用',
@@ -193,11 +197,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                 xtype: 'pagingtoolbar',
                 dock: 'bottom',
                 displayInfo: true,
-                emptyMsg: "暂无数据",
-                store: me.store,
-                displayMsg: '显示{0}-{1}条,共{2}条',
-                beforePageText: "第",
-                afterPageText: "页,共{0}页"
+                store: me.store
             }]
         });
         me.callParent(arguments);
@@ -207,8 +207,8 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
             var grid = tableView.up('grid'),
             idValue = record.get(grid.idField),
             codeValue = record.get(grid.codeField),
-            id = grid.xtype + idValue;
-            openTab(grid.addXtype,grid.addTitle+"("+codeValue+")",id, {
+            id = grid.addXtype + '-' + idValue;
+            openTab(grid.addXtype, grid.addTitle+"("+codeValue+")", id, {
                 initId: idValue
             });
         }

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

@@ -227,7 +227,7 @@ Ext.define('saas.view.core.query.QueryPanel', {
             var from = value.from,
             to = value.to;
 
-            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d h:i:s') + ',' + Ext.Date.format(new Date(to), 'Y-m-d h:i:s');
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
         }else if(xtype == 'combobox' || xtype == 'combo') {
             conditionValue = '\'' + value + '\'';
         }else if(xtype == 'multicombo') {

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

@@ -36,7 +36,7 @@ Ext.define('saas.view.core.query.QueryPanelController', {
         var me = this,
         queryPanel = me.getView(),
         gridPanel = queryPanel.down('core-query-querygridpanel'),
-        id = gridPanel.addXtype + '_add';
+        id = gridPanel.addXtype + '-add';
         openTab(gridPanel.addXtype,'新增'+gridPanel.addTitle,id)
     },
     onReSetClick:function(btn){

+ 41 - 0
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -156,6 +156,47 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 name: 'wh_statuscode',
                 value:'OPEN'
             }]
+        },
+        maxnumbers:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
+            },{
+                xtype:'textfield',
+                fieldLabel: '单据Caller',
+                name: 'mn_caller',
+                allowBlank:false
+            },{
+                xtype:'textfield',
+                fieldLabel: '单据前缀',
+                name: 'mn_leadcode',
+                allowBlank:false
+            },{
+                xtype:'combo',
+                fieldLabel: '单据规则',
+                name: 'mn_rule',
+                displayField : "display", 
+                editable:false,
+                hideTrigger : false, 
+                maxLength : 100.0, 
+                minValue : null, 
+                positiveNum : false, 
+                queryMode : "local", 
+                valueField : "value", 
+                store:{
+                    fields: ['display', 'value'],
+                    data : [
+                        {"display":"年月日", "value":'yyyymmdd'},
+                        {"display":"年月", "value":'yyyymm'}
+                    ]
+                }
+            },{
+                xtype:'numberfield',
+                hideTrigger : true, 
+                fieldLabel: '流水长度',
+                name: 'mn_number',
+                allowBlank:false
+            }]
         }
     },
     setFormItems:function() {

+ 27 - 0
frontend/saas-web/app/view/document/kind/Kind.js

@@ -167,6 +167,33 @@ Ext.define('saas.view.document.kind.Kind', {
             reqUrl: '/api/document/address/save',
             delUrl: '/api/document/address/delete'
         },
+        maxnumbers:{
+            columns: [{
+                text : "单据caller", 
+                width : 200.0, 
+                dataIndex : "mn_caller", 
+                xtype : "", 
+            }, 
+            {
+                text : "单据前缀", 
+                dataIndex : "mn_leadcode", 
+                width : 120.0, 
+                xtype : "", 
+            }, 
+            {
+                text : "单据规则", 
+                dataIndex : "mn_rule", 
+                width : 220.0, 
+                xtype : "", 
+            },{
+                text : "流水长度", 
+                dataIndex : "mn_number", 
+                width : 120.0, 
+                xtype : "", 
+            }],
+            keyField:'id',
+            reqUrl:'http://192.168.253.31:8920/number/save'
+        },
         warehouse:{
             columns: [{
                 text: '仓库编号',

+ 6 - 0
frontend/saas-web/app/view/main/Main.scss

@@ -147,3 +147,9 @@ $treelist-nav-ui: (
     font-size:14px;
     font-weight: 500;
 }
+.x-query-menu {
+    width:68px !important;
+}
+.x-query-menu .x-menu-item-text-default.x-menu-item-indent-no-separator {
+    margin-left: 11px !important;
+}

+ 15 - 15
frontend/saas-web/app/view/main/Navigation.js

@@ -138,14 +138,14 @@ Ext.define('saas.view.main.Navigation', {
                             Ext.Array.each(menuItemText, function (item) {
                                 item.addEventListener('click', function (e) {
                                     var target = e.target,
-                                        dataset = target.dataset,
-                                        viewType = dataset.viewtype,
-                                        type = dataset.type,
-                                        text = dataset.text,
-                                        id = dataset.id;
+                                    dataset = target.dataset,
+                                    viewType = dataset.viewtype,
+                                    type = dataset.type,
+                                    text = dataset.text,
+                                    id = dataset.id;
 
-                                    var tabTitle = text + (type == 'form' ? '' : '查询'),
-                                        tabId = 'maintab-' + type + '-' + id;
+                                    var tabTitle = text + '查询',
+                                    tabId = 'maintab-' + type + '-' + id;
 
                                     menu.navItem.classList.remove(menu.navView.overItemCls);
                                     openTab(viewType, tabTitle, tabId);
@@ -155,14 +155,14 @@ Ext.define('saas.view.main.Navigation', {
                             Ext.Array.each(menuItemIcon, function (item) {
                                 item.addEventListener('click', function (e) {
                                     var target = e.target,
-                                        dataset = target.dataset,
-                                        viewType = dataset.viewtype,
-                                        type = dataset.type,
-                                        text = dataset.text,
-                                        id = dataset.id;
-
-                                    var tabTitle = text + (type == 'form' ? '' : '查询'),
-                                        tabId = 'maintab-' + type + '-' + id;
+                                    dataset = target.dataset,
+                                    viewType = dataset.viewtype,
+                                    type = dataset.type,
+                                    text = dataset.text,
+                                    id = dataset.id;
+
+                                    var tabTitle ='新增' + text,
+                                    tabId = viewType + '-add';
 
                                     menu.navItem.classList.remove(menu.navView.overItemCls);
                                     openTab(viewType, tabTitle, tabId);

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

@@ -29,7 +29,7 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'ft_code',
-            width: 150
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'ft_status',

+ 1 - 1
frontend/saas-web/app/view/money/othreceipts/QueryPanel.js

@@ -54,7 +54,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'or_code',
-            width: 150
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'or_status',

+ 1 - 1
frontend/saas-web/app/view/money/othspendings/QueryPanel.js

@@ -54,7 +54,7 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'os_code',
-            width: 150
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'os_status',

+ 1 - 1
frontend/saas-web/app/view/money/payBalance/QueryPanel.js

@@ -29,7 +29,7 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pb_code',
-            width: 120
+            width: 200
         }, {
             text: '状态',
             dataIndex: 'pb_status',

+ 1 - 1
frontend/saas-web/app/view/money/recBalance/QueryPanel.js

@@ -42,7 +42,7 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'rb_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'rb_status',

+ 7 - 3
frontend/saas-web/app/view/purchase/purchase/FormPanelController.js

@@ -83,9 +83,13 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         dataUrl: '/api/document/product/list',
                         //放大镜赋值设置
                         dbfinds:[{
-                            from:'pr_code',to:'pd_prodcode'
+                            from:'id',to:'pd_prodid'                          
                         },{
-                            from:'pr_unit',to:'pd_unit'
+                            from:'pr_code',to:'pd_prodcode'                          
+                        },{
+                            from:'pr_detail',to:'pr_detail'
+                        },{
+                            from:'pr_spec',to:'pr_spec'
                         }],
                         //联想查询条件
                         dbCondition:"CONCAT(pr_code, pr_detail) like '{0}%'",
@@ -108,7 +112,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         dbColumns:[{
                             "text": "物料ID",
                             "flex": 0,
-                            "dataIndex": "pr_id",
+                            "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
                             "items": null

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

@@ -105,12 +105,16 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pu_status',
             width: 120
-        }, {
+        },{
+            text: '业务状态',
+            dataIndex: 'pu_acceptstatus',
+            width: 120
+        },{
             text: '单据日期',
             dataIndex: 'pu_indate',
             xtype: 'datecolumn',
@@ -139,7 +143,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pu_status',

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

@@ -95,7 +95,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         dbColumns:[{
                             "text": "物料ID",
                             "flex": 0,
-                            "dataIndex": "pr_id",
+                            "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
                             "items": null

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

@@ -117,7 +117,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

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

@@ -117,7 +117,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

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

@@ -26,8 +26,11 @@ Ext.define('saas.view.sale.sale.FormPanel', {
  
      toolBtns: [{
          xtype: 'button',
-         text: '转销售出货单',
-         handler: 'turnOut'
+         text: '转出货单',
+         handler: 'turnOut',
+         bind: {
+             hidden: '{sa_statuscode!="AUDITED"}'
+         }
      }],
 
     defaultItems: [{
@@ -46,7 +49,9 @@ Ext.define('saas.view.sale.sale.FormPanel', {
     }, {
         xtype : "dbfindtrigger", 
         name : "sa_custname", 
-        fieldLabel : "客户名称"
+        fieldLabel : "客户名称",
+        allowBlank : false
+
     }, {
         xtype : "textfield", 
         name : "sa_toplace", 
@@ -74,6 +79,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 dataIndex : "sd_prodcode", 
                 xtype : "", 
                 items : null,
+                allowBlank:false,
                 editor : {
                     displayField : "display", 
                     editable : true, 
@@ -113,6 +119,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 xtype : "numbercolumn", 
                 format:'0,000.00',
                 items : null,
+                allowBlank:false,
                 summaryType: 'sum'
             },  {
                 text : "已转数", 
@@ -156,11 +163,11 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 text : "交货日期", 
                 dataIndex : "sd_delivery", 
                 xtype:'datecolumn',
-                format : "Y-m-d H:i:s", 
+                format : "Y-m-d", 
                 editor : {
                     xtype : "datefield",
                     editable : true, 
-                    format : "Y-m-d H:i:s", 
+                    format : "Y-m-d", 
                     hideTrigger : false
                 }
             },{

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

@@ -209,7 +209,8 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                 openTab('sale-saleout-formpanel',name+"("+codeValue+")",codeValue+intValue, {
                     initId: intValue
                 });
-                showToast('转单成功');    
+                showToast('转单成功');  
+                form.FormUtil.loadData(form);
             }
         })
         .catch(function(res) {

+ 21 - 8
frontend/saas-web/app/view/sale/sale/QueryPanel.js

@@ -12,6 +12,10 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         name: 'sa_id',
         fieldLabel: 'ID',
         columnWidth: 0
+    }, {
+        xtype: 'textfield',
+        name: 'sa_code',
+        fieldLabel: '销售编号'
     }, {
         xtype: 'hidden',
         name: 'sa_custcode',
@@ -56,14 +60,14 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
     }, {
         xtype: 'multicombo',
         name: 'sa_sendstatuscode',
-        bind: '{sa_sendstatuscode}',
-        fieldLabel: '出库状态',
+        fieldLabel: '业务状态',
         allowBlank: true,
         columnWidth: 0.25,
         datas: [
             ["TURNOUT", "已出库"],
             ["UNTURNOUT", "未出库"],
-            ["PARTOUT", "部分出库"]
+            ["PARTOUT", "部分出库"],
+            ["CLOSE", "已关闭"]
         ]
     }],
     moreQueryFormItems: [],
@@ -85,16 +89,20 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
             width: 180
         }, {
             text: '客户编号',
-            dataIndex: 'sa_cucode',
+            dataIndex: 'sa_custcode',
             width: 120
         }, {
             text: '客户名称',
-            dataIndex: 'sa_cuname',
+            dataIndex: 'sa_custname',
             width: 120
         }, {
-            text: '业务状态',
+            text: '审核状态',
             dataIndex: 'sa_status',
             width: 120
+        }, {
+            text: '业务状态',
+            dataIndex: 'sa_sendstatus',
+            width: 120
         }, {
             text: '单据日期',
             dataIndex: 'sa_recorddate',
@@ -116,7 +124,12 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         }, {
             text: '收货地址',
             dataIndex: 'sa_toplace',
-            width: 120
+            width: 200
+        }, {
+            text: '备注',
+            dataIndex: 'sa_remark',
+            width: 250,
+            flex:1
         }
     ],
         relativeColumn: [ {
@@ -127,7 +140,7 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'sa_code',
-            width: 180
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'sa_status',

+ 17 - 3
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -34,7 +34,8 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
         fieldLabel : "单据类型", 
         readOnly:true,
         allowBlank : false, 
-        defaultValue:'销售退货单'
+        defaultValue:'销售退货单',
+        allowBlank:false
     },{
         xtype : "hidden", 
         name : "pi_custid",  
@@ -46,7 +47,8 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
     }, {
         xtype : "dbfindtrigger", 
         name : "pi_custname", 
-        fieldLabel : "客户名称"
+        fieldLabel : "客户名称",
+        allowBlank:false,
     }, {
         xtype : "textfield", 
         name : "pi_address", 
@@ -72,6 +74,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 text : "物料编号", 
                 width : 200.0, 
                 dataIndex : "pd_prodcode", 
+                allowBlank:false,
                 editor : {
                     displayField : "display", 
                     editable : true, 
@@ -104,6 +107,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
             }, {
                 text : "数量", 
                 dataIndex : "pd_inqty", 
+                allowBlank:false,
                 editor : {
                     xtype : "numberfield"
                 },
@@ -111,9 +115,18 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 xtype : "numbercolumn", 
                 format:'0',
                 summaryType: 'sum'
+            }, {
+                text : "仓库ID", 
+                dataIndex : "pd_whid", 
+                width : 0
+            }, {
+                text : "仓库", 
+                dataIndex : "pd_whcode", 
+                width :0
             }, {
                 text : "仓库", 
                 dataIndex : "pd_whname", 
+                allowBlank:false,
                 width : 120.0, 
                 editor : {
                     displayField : "display", 
@@ -142,7 +155,8 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 text : "含税金额", 
                 dataIndex : "pd_total", 
                 width : 120.0, 
-                xtype : "numbercolumn"
+                xtype : "numbercolumn",
+                summaryType: 'sum'
             }, {
                 text : "税率", 
                 dataIndex : "pd_taxrate", 

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

@@ -79,7 +79,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 180
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -121,7 +121,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

+ 10 - 5
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
     caller:'SaleOut',
     
     //字段属性
-    _title:'销售出货单',
+    _title:'出货单',
     _idField: 'id',
     _codeField: 'pi_inoutno',
     _statusField: 'pi_status',
@@ -43,7 +43,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
         fieldLabel : "单据类型", 
         readOnly:true,
         allowBlank : false, 
-        defaultValue:'销售出货单'
+        defaultValue:'出货单'
     }, {
         xtype : "hidden", 
         name : "pi_custid", 
@@ -55,7 +55,8 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
     }, {
         xtype : "dbfindtrigger", 
         name : "pi_custname", 
-        fieldLabel : "客户名称"
+        fieldLabel : "客户名称",
+        allowBlank:false,
     }, {
         xtype : "textfield", 
         name : "pi_address", 
@@ -83,6 +84,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 dataIndex : "pd_prodcode", 
                 xtype : "", 
                 items : null,
+                allowBlank:false,
                 editor : {
                     displayField : "display", 
                     editable : true, 
@@ -122,7 +124,8 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 xtype : "numbercolumn", 
                 format:'0,000.00',
                 items : null,
-                summaryType: 'sum'
+                summaryType: 'sum',
+                allowBlank:false,
             }, {
                 text : "仓库ID", 
                 dataIndex : "pd_whid", 
@@ -136,6 +139,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 dataIndex : "pd_whname", 
                 width : 120.0, 
                 items : null,
+                allowBlank:false,
                 editor : {
                     displayField : "display", 
                     editable : true, 
@@ -161,13 +165,14 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 items : null
             }, 
            {
-                text : "金额", 
+                text : "含税金额", 
                 dataIndex : "pd_total", 
                 width : 120.0, 
                 xtype : "numbercolumn",
                 editor : {
                     xtype : "numberfield"
                 },
+                summaryType: 'sum'
             }, {
                 text : "税率", 
                 dataIndex : "pd_taxrate", 

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

@@ -254,7 +254,7 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
         id = form.getForm().findField(form._idField);
         form.BaseUtil.request({
             url: form._turnInUrl+id.value,
-            method: 'GET',
+            method: 'POST',
         })
         .then(function(localJson) {
             if(localJson.success){
@@ -264,7 +264,8 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                 openTab('sale-salein-formpanel',name+"("+codeValue+")",codeValue+intValue, {
                     initId: intValue
                 });
-                showToast('转单成功');    
+                showToast('转单成功');  
+                form.FormUtil.loadData(form);  
             }
         })
         .catch(function(res) {

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

@@ -67,9 +67,9 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
     queryGridConfig: {
         idField:'id',
         codeField:'pi_inoutno',
-        addTitle:'销售出货单',
+        addTitle:'出货单',
         addXtype:'sale-saleout-formpanel',
-        defaultCondition:' pi_class = \'销售出货单\'',
+        defaultCondition:' pi_class = \'出货单\'',
         baseVastUrl: '/api/sale/prodinout/',
         baseColumn: [{
             text: 'id',
@@ -79,7 +79,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 180
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -121,7 +121,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

+ 43 - 39
frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js

@@ -92,15 +92,18 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
         fieldLabel : "单据日期", 
         allowBlank : false, 
         columnWidth : 0.25
-    },{
-        xtype : "textfield", 
-        name : "pi_total", 
-        bind : "{pi_total}", 
-        fieldLabel : "总额", 
-        allowBlank : true,
-        readOnly: true,
-        columnWidth : 0.25
-    }, {
+    }
+    // ,{
+    //     xtype : "textfield", 
+    //     name : "pi_total", 
+    //     bind : "{pi_total}", 
+    //     fieldLabel : "总额", 
+    //     allowBlank : true,
+    //     readOnly: true,
+    //     columnWidth : 0.25
+    // }
+    ,
+     {
         name : "detailGridField", 
         xtype : "detailGridField",
         storeModel:'saas.model.purchase.ProdIODetail',
@@ -224,37 +227,38 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
                     valueField : "value", 
                     xtype : "dbfindtrigger"
                 }
-            },
-            {
-                text : "单价", 
-                dataIndex : "pd_orderprice",
-                editor : {
-                    xtype : "numberfield"
-                },   
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                items : null
-            }, 
-           {
-                text : "含税金额", 
-                dataIndex : "pd_total", 
-                width : 120.0, 
-                xtype : "numbercolumn"
-            }, {
-                text : "税率", 
-                dataIndex : "pd_taxrate",
-                editor : {
-                    xtype : "numberfield"
-                },   
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                items : null
-            },
-            {
-                text : "未税金额", 
-                dataIndex : "pd_nettotal", 
-                xtype : "numbercolumn"
             }
+        //     ,
+        //     {
+        //         text : "单价", 
+        //         dataIndex : "pd_orderprice",
+        //         editor : {
+        //             xtype : "numberfield"
+        //         },   
+        //         width : 120.0, 
+        //         xtype : "numbercolumn", 
+        //         items : null
+        //     }, 
+        //    {
+        //         text : "含税金额", 
+        //         dataIndex : "pd_total", 
+        //         width : 120.0, 
+        //         xtype : "numbercolumn"
+        //     }, {
+        //         text : "税率", 
+        //         dataIndex : "pd_taxrate",
+        //         editor : {
+        //             xtype : "numberfield"
+        //         },   
+        //         width : 120.0, 
+        //         xtype : "numbercolumn", 
+        //         items : null
+        //     },
+        //     {
+        //         text : "未税金额", 
+        //         dataIndex : "pd_nettotal", 
+        //         xtype : "numbercolumn"
+        //     }
         ]
     }, {
         format : "Y-m-d", 

+ 2 - 2
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanel.js

@@ -117,7 +117,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

+ 2 - 2
frontend/saas-web/app/view/stock/make/QueryPanel.js

@@ -113,7 +113,7 @@ Ext.define('saas.view.stock.make.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pu_status',
@@ -147,7 +147,7 @@ Ext.define('saas.view.stock.make.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pu_code',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pu_status',

+ 0 - 8
frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -164,14 +164,6 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                 format:'0',
                 items : null,
                 summaryType: 'sum'
-            },            {
-                text : "已转数", 
-                dataIndex : "pd_yqty", 
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null,
-                summaryType: 'sum'
             },{
                 text : "仓库id", 
                 dataIndex : "pd_whid", 

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

@@ -66,7 +66,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                 beforerender: function (f) {
                     Ext.apply(f, {
 
-                        dataUrl: '/api/document/vendor/list',
+                        dataUrl: '/api/document/customer/list',
                         // dataUrl:'http://localhost:9480/customer/list',
                         dbfinds: [{
                             from: 'id',

+ 2 - 2
frontend/saas-web/app/view/stock/otherIn/QueryPanel.js

@@ -117,7 +117,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

+ 1 - 9
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -161,15 +161,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                 format: '0',
                 items: null,
                 summaryType: 'sum'
-            }, {
-                text: "已转数",
-                dataIndex: "pd_yqty",
-                width: 120.0,
-                xtype: "numbercolumn",
-                format: '0',
-                items: null,
-                summaryType: 'sum'
-            }, {
+            },{
                 text: "仓库id",
                 dataIndex: "pd_whid",
                 xtype: "numbercolumn",

+ 2 - 2
frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

@@ -117,7 +117,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',
@@ -159,7 +159,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pd_inoutno',
-            width: 120
+            width: 200
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

+ 212 - 0
frontend/saas-web/app/view/sys/finish/DataList.js

@@ -0,0 +1,212 @@
+Ext.define('saas.view.sys.finish.DataList', {
+    extend: 'Ext.grid.Panel',
+    xtype: 'sys-finish-datalist',
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+    autoScroll: true,
+    frame:true,
+    layout:'fit',
+    dataUrl:'/api/common/finish/list',
+
+    tbar: [{
+        width: 250,
+        name: 'ml_caller',
+        xtype: 'displayfield',
+        fieldLable : '结账日'
+    },{
+        xtype:'button',
+        text:'结账',
+    },{
+        xtype:'button',
+        text:'反结账',
+    },'->',{
+        cls:'x-formpanel-btn-blue',
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click:function(b){
+                var grid = b.ownerCt.ownerCt;
+                grid.store.loadPage(1);
+            }
+        }
+    }],
+
+    //字段属性
+    columns : [{
+        text : "id", 
+        width : 0, 
+        dataIndex : "id", 
+        xtype : "numbercolumn",   
+    },{
+        text:'结账日',
+        dataIndex : "ml_caller",
+        xtype:'datecolumn',
+        width : 200.0, 
+    },{
+        text : "操作日期", 
+        width : 200.0, 
+        dataIndex : "ml_code", 
+        xtype:'datecolumn',
+    }, 
+    {
+        text : "操作员", 
+        dataIndex : "ml_content", 
+        width : 220.0, 
+    }],
+
+    condition:'',
+
+    initComponent: function() {
+        var me = this;
+        if(me.columns){
+            var fields = me.columns.map(column => column.dataIndex);
+            me.store = Ext.create('Ext.data.Store',{
+                fields:fields,
+                autoLoad: true,
+                pageSize: 11,
+                data: [],
+                proxy: {
+                    timeout:8000,
+                    type: 'ajax',
+                    url: me.dataUrl,
+                    actionMethods: {
+                        read: 'GET'
+                    },
+                    reader: {
+                        type: 'json',
+                        rootProperty: 'data.list',
+                        totalProperty: 'data.total',
+                    }
+                },
+                listeners: {
+                    beforeload: function (store, op) {
+                        var condition = me.condition;
+                        if (Ext.isEmpty(condition)) {
+                            condition = "";
+                        }
+                        Ext.apply(store.proxy.extraParams, {
+                            number: op._page,
+                            size: store.pageSize,
+                            condition: JSON.stringify(condition)
+                        });
+                    }
+                }
+            });
+
+            Ext.apply(me, {
+                dockedItems:[{
+                    xtype: 'pagingtoolbar',
+                    dock: 'bottom',
+                    displayInfo: true,
+                    store: me.store
+                }]
+            });
+        }
+        me.callParent(arguments);
+    },
+
+     /**
+     * 获得过滤条件
+     */
+    getCondition: function(items) {
+        var me = this,
+        conditions = [];
+
+        for(var i = 0; i < items.length; i++) {
+            var item = items[i];
+            var field = item.name,
+            func = item.getCondition,
+            value = item.value,
+            condition;
+
+            if(typeof func == 'function') {
+                condition = {
+                    type: 'condition',
+                    value: func(value)
+                }
+            }else {
+                var xtype = item.xtype || 'textfield',
+                type = item.fieldType || me.getDefaultFieldType(xtype),
+                operation = item.operation || me.getDefaultFieldOperation(xtype),
+                conditionValue = me.getConditionValue(xtype, value);
+    
+                if(!conditionValue) {
+                    continue;
+                }
+                condition = {
+                    type: type,
+                    field: field,
+                    operation: operation,
+                    value: conditionValue
+                }
+            }
+            conditions.push(condition);
+        };
+        return conditions;
+    },
+
+    getDefaultFieldType: function(xtype) {
+        var type;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            type = 'number';
+        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+            type = 'date';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+            type = 'enum';
+        }else {
+            type = 'string';
+        }
+
+        return type;
+    },
+
+    getDefaultFieldOperation: function(xtype) {
+        var operation;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['datefield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+            operation = 'between';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+            operation = 'in';
+        }else {
+            operation = 'like';
+        }
+
+        return operation;
+    },
+
+    /**
+     * 处理部分字段值
+     */
+    getConditionValue: function(xtype, value) {
+        var conditionValue;
+        if(xtype == 'datefield') {
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d h:i:s');
+        }else if(xtype == 'condatefield') {
+            var from = value.from,
+            to = value.to;
+
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d h:i:s') + ',' + Ext.Date.format(new Date(to), 'Y-m-d h:i:s');
+        }else if(xtype == 'combobox' || xtype == 'combo') {
+            conditionValue = '\'' + value + '\'';
+        }else if(xtype == 'multicombo') {
+            conditionValue = value.map(function(v) {
+                return '\'' + v.value + '\'';
+            }).join(',');
+        }else {
+            conditionValue = value;
+        }
+
+        return conditionValue;
+    },
+
+    refresh:function(){
+        //debugger
+    }
+
+});

+ 43 - 14
frontend/saas-web/app/view/sys/maxnumbers/DataList.js

@@ -4,11 +4,15 @@
 Ext.define('saas.view.sys.maxnumbers.DataList', {
     extend: 'Ext.grid.Panel',
     xtype: 'sys-maxnumbers-datalist',
+    controller: 'sys-maxnumbers-datalist',
+    viewModel: 'sys-maxnumbers-datalist',
     autoScroll: true,
     frame:true,
     layout:'fit',
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
     dataUrl:'http://192.168.253.31:8920/number/list',
-    saveUrl:'http://192.168.253.31:8920/number/save',
     deleteUrl:'http://192.168.253.31:8920/number/delete/',
 
     tbar: [{
@@ -47,7 +51,24 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
         xtype:'button',
         text:'新增',
         listeners: {
-            click: 'onAdd'
+            click: function(){
+                var document = Ext.create('saas.view.document.kind.Kind',{});
+                var form = this.ownerCt.ownerCt;
+                var grid = this.ownerCt.ownerCt.items.items[0].grid;
+                this.dialog = form.getController().getView().add({
+                    xtype: 'document-kind-childwin',
+                    bind: {
+                        title: '新增单据编码规则'
+                    },
+                    dataKind:'maxnumbers',
+                    belong:document.etc['maxnumbers'],
+                    _parent:form,
+                    _combo:grid,
+                    record:null,
+                    session: true
+                });
+                this.dialog.show();
+            }
         }
     }],
 
@@ -74,7 +95,7 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
         width : 220.0, 
         xtype : "", 
     },{
-        text : "规则长度", 
+        text : "流水长度", 
         dataIndex : "mn_number", 
         width : 120.0, 
         xtype : "", 
@@ -126,11 +147,7 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
                     xtype: 'pagingtoolbar',
                     dock: 'bottom',
                     displayInfo: true,
-                    emptyMsg: "暂无数据",
-                    store: me.store,
-                    displayMsg: '显示{0}到{1}条数据,共有{2}条',
-                    beforePageText: "当前第",
-                    afterPageText: "页,共{0}页"
+                    store: me.store
                 }]
             });
         }
@@ -168,17 +185,29 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
     listeners:{
         itemClick: function(view,record,a,index,c) {
             var classList = c.target.classList.value;
-            var form = view.ownerCt.ownerCt;
+            var grid = this;
             if(classList.indexOf('fa-pencil')>-1){
-                var config = {};
-                config.initId = record.get('id');
-                openTab(form._formXtype, '修改'+form._title, form._formXtype+config.initId, config);
+                var document = Ext.create('saas.view.document.kind.Kind',{});
+                var form = this.ownerCt;
+                this.dialog = form.getController().getView().add({
+                    xtype: 'document-kind-childwin',
+                    bind: {
+                        title: '修改单据编码规则'
+                    },
+                    dataKind:'maxnumbers',
+                    belong:document.etc['maxnumbers'],
+                    _parent:form,
+                    _combo:this,
+                    record:record,
+                    session: true
+                });
+                this.dialog.show();
             }else if(classList.indexOf('fa-trash-o')>-1){
                 //删除
                 var id = record.get('id');
                 if(id){
-                    form.BaseUtil.request({
-                        url: form._deleteUrl+id,
+                    grid.BaseUtil.request({
+                        url: grid.deleteUrl+id,
                         method: 'POST',
                     })
                     .then(function(localJson) {

+ 10 - 0
frontend/saas-web/app/view/sys/maxnumbers/DataListController.js

@@ -0,0 +1,10 @@
+Ext.define('saas.view.sys.maxnumbers.DataListController', {
+    extend: 'saas.view.core.base.BasePanelController',
+    alias: 'controller.sys-maxnumbers-datalist',
+
+    init: function (form) {
+        var me = this;
+        this.control({
+        });
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/sys/maxnumbers/DataListlModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.sys.maxnumbers.DataListModel', {
+    extend: 'saas.view.core.base.BasePanelModel',
+    alias: 'viewmodel.sys-maxnumbers-datalist'
+});

+ 2 - 19
frontend/saas-web/app/view/sys/messagelog/DataList.js

@@ -5,7 +5,7 @@ Ext.define('saas.view.sys.messagelog.DataList', {
     autoScroll: true,
     frame:true,
     layout:'fit',
-    dataUrl:'api/common/messagelog/list',
+    dataUrl:'/api/commons/messagelog/list',
 
     tbar: [{
         width: 150,
@@ -120,30 +120,13 @@ Ext.define('saas.view.sys.messagelog.DataList', {
                     xtype: 'pagingtoolbar',
                     dock: 'bottom',
                     displayInfo: true,
-                    emptyMsg: "暂无数据",
-                    store: me.store,
-                    displayMsg: '显示{0}到{1}条数据,共有{2}条',
-                    beforePageText: "当前第",
-                    afterPageText: "页,共{0}页"
+                    store: me.store
                 }]
             });
         }
         me.callParent(arguments);
     },
 
-    getCondition: function(f,conditionExpression){
-        var condition = '';
-        if((f.xtype == 'checkbox' || f.xtype == 'radio')&&f.logic){
-            
-        }else if(f.xtype=='textfield'&&f.value!=''){
-            condition=conditionExpression.replace(new RegExp("\\{0}","g"), f.value);
-        }
-        if(condition.length>0){
-            condition+= ' AND ';
-        }
-        return condition;
-    },
-
      /**
      * 获得过滤条件
      */

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

@@ -3,8 +3,9 @@
  * 2017年10月12日
  */
 Ext.define('Ext.locale.zh_CN.field.Date', {
-    override: 'Ext.field.Date',
+    override: 'Ext.form.field.Date',
 
+    formatText: '当前日期格式为 {0}.',
     minDateMessage: '该输入项的日期必须在 {0} 之后',
     maxDateMessage: '该输入项的日期必须在 {0} 之前'
 });

+ 20 - 0
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/grid/pagtoolbar/Paging.js

@@ -0,0 +1,20 @@
+/**
+ * 简体中文 by lovelyelfpop <479858761@qq.com>
+ * 2017年10月16日
+ */
+Ext.define('Ext.locale.zh_CN.grid.pagtoolbar.Paging', {
+    override: 'Ext.toolbar.Paging',
+
+    config: {
+        emptyMsg:'暂无数据',
+        firstText:'首页',
+        prevText:'上一页',
+        nextText:'下一页',
+        lastText:'尾页',
+        refreshText:'刷新',
+        displayMsg: '显示{0}到{1}条数据,共有{2}条',
+        beforePageText: "当前第",
+        afterPageText: "页,共{0}页"
+    }
+});
+

+ 21 - 2
frontend/saas-web/overrides/i18n.js

@@ -7,10 +7,10 @@
  */
 function openTab(xtype, title, id, config) {
     var mainTab = Ext.getCmp('main-tab-panel');
-    var panel = Ext.getCmp(id);
+    var panel = mainTab.query('[tabId="' + id + '"]')[0];
     if(!panel) {
         panel = Ext.create('saas.view.core.tab.Panel', {
-            id: id,
+            tabId: id,
             title: title,
             viewType: xtype,
             viewConfig: config
@@ -39,4 +39,23 @@ function showToast(content, title) {
         slideDUration: 400,
         maxWidth: 400
     });
+}
+
+/**
+ * 重设tab标题
+ */
+function refreshTabTitle(id, title) {
+    var currentTab = getCurrentTab();
+    currentTab.tabId = id;
+    currentTab.setTitle(title);
+}
+
+/**
+ * 获得当前Tab
+ */
+function getCurrentTab() {
+    var mainTab = Ext.getCmp('main-tab-panel');
+    var currentTab = mainTab.getActiveTab();
+
+    return currentTab;
 }

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

@@ -257,15 +257,14 @@
             "viewType": "sys-messagelog-datalist",
             "leaf": true
         }, {
-            "id":"sys-messagelog-datalist",
+            "id":"sys-maxnumbers-datalist",
             "text": "单据编码规则",
             "viewType": "sys-maxnumbers-datalist",
             "leaf": true
         }, {
-            "id":"product-list-formpanel",
+            "id":"sys-finish-datalist",
             "text": "结账/反结账",
-            "viewType": "document-product-basepanel",
-            "addType":"document-product-formpanel",
+            "viewType": "sys-finish-datalist",
             "leaf": true
         }]
     }]