Browse Source

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

guq 7 years ago
parent
commit
385775c5e1
40 changed files with 711 additions and 170 deletions
  1. 8 0
      applications/commons/commons-server/src/main/resources/application.yml
  2. 1 1
      applications/commons/commons-server/src/main/resources/mapper/EndProductMapper.xml
  3. 8 0
      applications/document/document-server/src/main/resources/application.yml
  4. 1 1
      applications/document/document-server/src/main/resources/mapper/ProductMapper.xml
  5. 10 2
      applications/money/money-server/src/main/resources/application.yml
  6. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdIODetailMapper.java
  7. 3 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/ProdInOutService.java
  8. 14 4
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  9. 4 16
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  10. 8 0
      applications/purchase/purchase-server/src/main/resources/application.yml
  11. 13 7
      applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml
  12. 78 29
      applications/purchase/purchase-server/src/main/resources/mapper/PurchasedetailMapper.xml
  13. 8 0
      applications/sale/sale-server/src/main/resources/application.yml
  14. 8 0
      applications/storage/storage-server/src/main/resources/application.yml
  15. 12 0
      base-servers/account/account-server/src/main/resources/application.yml
  16. 15 0
      base-servers/auth/auth-server/src/main/resources/application.yml
  17. 12 0
      base-servers/gateway-server/src/main/resources/application.yml
  18. 12 0
      base-servers/ui-server/src/main/resources/application.yml
  19. 3 0
      frontend/saas-web/app/util/FormUtil.js
  20. 2 2
      frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js
  21. 1 0
      frontend/saas-web/app/view/core/form/FormPanel.js
  22. 22 0
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  23. 7 0
      frontend/saas-web/app/view/core/query/QueryPanel.js
  24. 2 0
      frontend/saas-web/app/view/core/tab/Controller.js
  25. 3 0
      frontend/saas-web/app/view/document/kind/Kind.js
  26. 4 0
      frontend/saas-web/app/view/document/kind/KindController.js
  27. 1 1
      frontend/saas-web/app/view/document/product/FormPanel.js
  28. 3 2
      frontend/saas-web/app/view/main/Navigation.js
  29. 1 23
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  30. 6 0
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  31. 10 11
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  32. 2 3
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  33. 9 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelModel.js
  34. 304 0
      frontend/saas-web/app/view/stock/stockamount/DataList.js
  35. 10 0
      frontend/saas-web/app/view/stock/stockamount/DataListController.js
  36. 4 0
      frontend/saas-web/app/view/stock/stockamount/DataListlModel.js
  37. 47 21
      frontend/saas-web/app/view/sys/config/FormPanel.js
  38. 28 36
      frontend/saas-web/app/view/sys/config/FormPanelController.js
  39. 20 9
      frontend/saas-web/app/view/sys/finish/DataList.js
  40. 5 1
      frontend/saas-web/resources/json/navigation.json

+ 8 - 0
applications/commons/commons-server/src/main/resources/application.yml

@@ -34,6 +34,14 @@ spring:
   sleuth:
     sampler:
       probability: 1.0
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
 eureka:
   instance:
     leaseRenewalIntervalInSeconds: 10

+ 1 - 1
applications/commons/commons-server/src/main/resources/mapper/EndProductMapper.xml

@@ -22,7 +22,7 @@
         <result column="ml_keyvalue" property="ml_keyvalue" jdbcType="INTEGER" />
     </resultMap>
     <select id="getListData" resultMap="MsgResult">
-        SELECT * FROM MESSAGELOG WHERE ML_CALLER='EndProduct' AND COMPANYID=#{companyId} AND ml_result='记账成功'
+        SELECT * FROM MESSAGELOG WHERE ML_CALLER='EndProduct' AND COMPANYID=#{companyId} AND ml_result like '%记账成功' ORDER BY ML_ID DESC
     </select>
 
     <select id="endProduct" parameterMap="spParamMap" statementType="CALLABLE">

+ 8 - 0
applications/document/document-server/src/main/resources/application.yml

@@ -48,6 +48,14 @@ eureka:
     registryFetchIntervalSeconds: 5
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
 server:
   port: 9480
   tomcat:

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

@@ -66,7 +66,7 @@
                 ${con}
             </if>
             <if test="companyId != null">
-                and  PRODUCT.companyid = #{companyId}
+                and  PRODUCT.companyid = #{companyId} and productonhand.companyId=#{companyId}
             </if>
         </where>
     </select>

+ 10 - 2
applications/money/money-server/src/main/resources/application.yml

@@ -22,8 +22,8 @@ spring:
     host: 192.168.0.176
     port: 5672
     virtual-host: dev
-    password: saas
-    username: select123***
+    username: saas
+    password: select123***
   zipkin:
     sender:
       type: rabbit
@@ -45,6 +45,14 @@ eureka:
     registryFetchIntervalSeconds: 5
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
 server:
   port: 8880
   tomcat:

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

@@ -34,4 +34,6 @@ public interface ProdIODetailMapper extends CommonBaseMapper<ProdIODetail> {
     void calcProdIn(@Param("pi_id") Long pi_id);
 
     void calcProdOut(@Param("pi_id") Long pi_id);
+
+    void getDefaultWarehouseByProduct(@Param("pi_id") Long pi_id);
 }

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

@@ -77,4 +77,7 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
 
     void calcProdInout(Long pi_id, String pi_class);
 
+    String pushMaxnubmer(ProdInOut prodInOut);
+
+    void getDefaultWarehouseByProduct(Long pi_id);
 }

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

@@ -395,6 +395,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         targetPi.setPi_class(BillCodeSeq.PURCHASEOUT.getName());
         targetPi.setPi_date(new Date());
         targetPi.setPi_recorddate(new Date());
+        targetPi.setPi_vendid(sourcePi.getPi_vendid());
         targetPi.setPi_vendcode(sourcePi.getPi_vendcode());
         targetPi.setPi_vendname(sourcePi.getPi_vendname());
         targetPi.setPi_puid(sourcePi.getPi_puid());
@@ -403,7 +404,6 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         targetPi.setCompanyId(sourcePi.getCompanyId());
         targetPi.setCreateTime(new Date());
 
-
         //保存数据
         getMapper().insertSelective(targetPi);
         //插入验退单从表
@@ -427,6 +427,11 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                  targetPid.setPd_prodcode(sourcePid.getPd_prodcode());
                  targetPid.setPd_ioid(sourcePid.getId());
                  targetPid.setPd_taxrate(sourcePid.getPd_taxrate());
+                 //仓库信息
+                 targetPid.setPd_whid(sourcePid.getPd_whid());
+                 targetPid.setPd_whcode(sourcePid.getPd_whcode());
+                 targetPid.setPd_whname(sourcePid.getPd_whname());
+
                  //公司id
                  targetPid.setCompanyId(sourcePid.getCompanyId());
                  targetPid.setCreateTime(new Date());
@@ -439,7 +444,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                  prodIODetailMapper.updateByPrimaryKeySelective(sourcePid);
              }
          }
-
+        //更新默认仓库
+//        getDefaultWarehouseByProduct(pi_id);
         //采购验退单相关计算
         calcProdInout(pi_id,"采购验退单");
         DocBaseDTO baseDTO = new DocBaseDTO();
@@ -530,7 +536,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     }
 
 
-    private String pushMaxnubmer(ProdInOut prodInOut) {
+    public String pushMaxnubmer(ProdInOut prodInOut) {
         String pi_inoutno = prodInOut.getPi_inoutno();
         String pi_class = prodInOut.getPi_class();
         Long id = prodInOut.getId();
@@ -549,7 +555,11 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         return maxnumberService.pushMaxnubmer(count, pi_inoutno, caller).getData();
     }
 
-
+    @Override
+    @Transactional
+    public void getDefaultWarehouseByProduct(Long pi_id) {
+        prodIODetailMapper.getDefaultWarehouseByProduct(pi_id);
+    }
 
 
     private ProdInOut checkAndReturnOrder (Long id){

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

@@ -180,12 +180,6 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         }
         baseDTO = getBaseDTOById(pu_id);
 
-        //取供应商汇率
-        getVendorTaxrate(pu_id);
-        //取价
-        getPrice(pu_id);
-
-
         //计算金额,未税单价,未税金额等
         calcPurchase(pu_id);
         //日志
@@ -193,14 +187,6 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         return baseDTO;
     }
 
-    private void getVendorTaxrate(Long pu_id) {
-//        purchasedetailMapper.getVendorTaxrate(pu_id);
-    }
-
-    private void getPrice(Long pu_id) {
-//        purchasedetailMapper.getPrice(pu_id);
-    }
-
 
     @Override
     @Transactional
@@ -461,7 +447,6 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                 //公司id
                 prodIODetail.setCompanyId(purchaseDetail.getCompanyId());
                 prodIODetail.setCreateTime(new Date());
-
                 //本次转单数
                 prodIODetail.setPd_inqty(pdQty-pdYqty);
                 prodIODetailMapper.insertSelective(prodIODetail);
@@ -470,7 +455,10 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                 purchasedetailMapper.updateByPrimaryKeySelective(purchaseDetail);
             }
         }
-        //采购单相关计算
+        //更新默认仓库
+        prodInOutService.getDefaultWarehouseByProduct(pi_id);
+
+        //采购验收单相关计算
         prodInOutService.calcProdInout(pi_id,"采购验收单");
         DocBaseDTO baseDTO = new DocBaseDTO();
         baseDTO.setId(pi_id);

+ 8 - 0
applications/purchase/purchase-server/src/main/resources/application.yml

@@ -48,6 +48,14 @@ eureka:
     registryFetchIntervalSeconds: 5
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
 server:
   port: 8800
   tomcat:

+ 13 - 7
applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -740,19 +740,25 @@
 
   <update id="calcProdIn">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),pd_nettotal = pd_netprice*ifnull(pd_inqty,0) 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 prodiodetail set pd_total = round(ifnull(pd_orderprice,0)*ifnull(pd_inqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_inqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = round((select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_nettotal = round((select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
   <update id="calcProdOut">
     update prodiodetail set pd_netprice = ifnull(pd_orderprice,0)/(1+ifnull(pd_taxrate,0)/100) where pd_piid = #{pi_id,jdbcType=INTEGER};
-    update prodiodetail set pd_total = ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),pd_nettotal = pd_netprice*ifnull(pd_outqty,0) 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 prodiodetail set pd_total = round(ifnull(pd_orderprice,0)*ifnull(pd_outqty,0),2),pd_nettotal = round(pd_netprice*ifnull(pd_outqty,0),2)  where pd_piid = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_total = round((select sum(pd_total) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
+    update prodinout set pi_nettotal = round((select sum(pd_nettotal) from prodiodetail where pd_piid = #{pi_id,jdbcType=INTEGER} ),2)  where pi_id = #{pi_id,jdbcType=INTEGER};
   </update>
 
-
+  <update id="getDefaultWarehouseByProduct">
+    update prodiodetail
+    set pd_whid=(select pr_whid from product where pd_prodid = pr_id),
+    pd_whcode=(select pr_whcode from product where pd_prodid = pr_id),
+    pd_whname=(select pr_whname from product where pd_prodid = pr_id)
+    where pd_piid = #{pi_id,jdbcType=INTEGER};
+  </update>
 
 
 </mapper>

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

@@ -361,32 +361,81 @@
   <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.pd_puid},
-      PD_CODE = #{item.pd_code},
-      PD_DETNO = #{item.pd_detno},
-      PD_PRODID = #{item.pd_prodid},
-      PD_PRODCODE = #{item.pd_prodcode},
-      PD_UNIT = #{item.pd_unit},
-      PD_QTY = #{item.pd_qty},
-      PD_PRICE = #{item.pd_price},
-      PD_TAXPRICE = #{item.pd_taxprice},
-      PD_TOTAL = #{item.pd_total},
-      PD_TAXRATE = #{item.pd_taxrate},
-      PD_TAXTOTAL = #{item.pd_taxtotal},
-      PD_ACCEPTQTY = #{item.pd_acceptqty},
-      PD_DELIVERY = #{item.pd_delivery},
-      PD_SALECODE = #{item.pd_salecode},
-      PD_SALEDETNO = #{item.pd_saledetno},
-      PD_SDID = #{item.pd_sdid},
-      companyId = #{item.companyId},
-      updaterId = #{item.updaterId},
-      updateTime = #{item.updateTime},
-      pd_text1 = #{item.pd_text1},
-      pd_text2 = #{item.pd_text2},
-      pd_text3 = #{item.pd_text3},
-      pd_text4 = #{item.pd_text4},
-      pd_text5 = #{item.pd_text5},
-      pd_yqty = #{item.pd_yqty}
+      <if test="item.pd_puid != null" >
+        PD_PUID = #{item.pd_puid,jdbcType=INTEGER},
+      </if>
+      <if test="item.pd_code != null" >
+        PD_CODE = #{item.pd_code,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_detno != null" >
+        PD_DETNO = #{item.pd_detno,jdbcType=INTEGER},
+      </if>
+      <if test="item.pd_prodid != null" >
+        PD_PRODID = #{item.pd_prodid,jdbcType=INTEGER},
+      </if>
+      <if test="item.pd_prodcode != null" >
+        PD_PRODCODE = #{item.pd_prodcode,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_unit != null" >
+        PD_UNIT = #{item.pd_unit,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_qty != null" >
+        PD_QTY = #{item.pd_qty,jdbcType=DOUBLE},
+      </if>
+      <if test="item.pd_price != null" >
+        PD_PRICE = #{item.pd_price,jdbcType=DOUBLE},
+      </if>
+      <if test="item.pd_total != null" >
+        PD_TOTAL = #{item.pd_total,jdbcType=DOUBLE},
+      </if>
+      <if test="item.pd_taxrate != null" >
+        PD_TAXRATE = #{item.pd_taxrate,jdbcType=DOUBLE},
+      </if>
+      <if test="item.pd_taxtotal != null" >
+        PD_TAXTOTAL = #{item.pd_taxtotal,jdbcType=DOUBLE},
+      </if>
+      <if test="item.pd_acceptqty != null" >
+        PD_ACCEPTQTY = #{item.pd_acceptqty,jdbcType=DOUBLE},
+      </if>
+      <if test="item.pd_delivery != null" >
+        PD_DELIVERY = #{item.pd_delivery,jdbcType=DOUBLE},
+      </if>
+      <if test="item.pd_salecode != null" >
+        PD_SALECODE = #{item.pd_salecode,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_saledetno != null" >
+        PD_SALEDETNO = #{item.pd_saledetno,jdbcType=INTEGER},
+      </if>
+      <if test="item.pd_sdid != null" >
+        PD_SDID = #{item.pd_sdid,jdbcType=INTEGER},
+      </if>
+      <if test="item.companyId != null" >
+        companyId = #{item.companyId,jdbcType=INTEGER},
+      </if>
+      <if test="item.updaterId != null" >
+        updaterId = #{item.updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="item.updateTime != null" >
+        updateTime = #{item.updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="item.pd_text1 != null" >
+        pd_text1 = #{item.pd_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_text2 != null" >
+        pd_text2 = #{item.pd_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_text3 != null" >
+        pd_text3 = #{item.pd_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_text4 != null" >
+        pd_text4 = #{item.pd_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_text5 != null" >
+        pd_text5 = #{item.pd_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="item.pd_yqty != null" >
+        pd_yqty = #{item.pd_yqty,jdbcType=DOUBLE},
+      </if>
       </set>
       where PD_ID = #{item.id,jdbcType=INTEGER}
     </foreach>
@@ -410,9 +459,9 @@
 
   <update id="calcPurchase" parameterType="long" >
     update purchasedetail set pd_taxprice = ifnull(PD_PRICE,0)/(1+ifnull(pd_taxrate,0)/100) where pd_puid = #{pu_id,jdbcType=INTEGER};
-    update purchasedetail set pd_total = ifnull(PD_PRICE,0)*ifnull(pd_qty,0),pd_taxtotal = pd_taxprice*ifnull(pd_qty,0) where pd_puid = #{pu_id,jdbcType=INTEGER};
-    update purchase set pu_total = (select sum(pd_total) from purchasedetail where pd_puid = #{pi_id,jdbcType=INTEGER} ) where pu_id = #{pu_id,jdbcType=INTEGER};
-    update purchase set PU_TAXTOTAL = (select sum(pd_taxtotal) from purchasedetail where pd_puid = #{pi_id,jdbcType=INTEGER} ) where pu_id = #{pu_id,jdbcType=INTEGER};
+    update purchasedetail set pd_total = round(ifnull(PD_PRICE,0)*ifnull(pd_qty,0),2),pd_taxtotal = round(pd_taxprice*ifnull(pd_qty,0),2) where pd_puid = #{pu_id,jdbcType=INTEGER};
+    update purchase set pu_total = round((select sum(pd_total) from purchasedetail where pd_puid = #{pi_id,jdbcType=INTEGER} ),2)  where pu_id = #{pu_id,jdbcType=INTEGER};
+    update purchase set PU_TAXTOTAL = round((select sum(pd_taxtotal) from purchasedetail where pd_puid = #{pi_id,jdbcType=INTEGER} ),2)  where pu_id = #{pu_id,jdbcType=INTEGER};
   </update>
 
 

+ 8 - 0
applications/sale/sale-server/src/main/resources/application.yml

@@ -46,6 +46,14 @@ eureka:
     registryFetchIntervalSeconds: 5
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
 server:
   port: 8820
   tomcat:

+ 8 - 0
applications/storage/storage-server/src/main/resources/application.yml

@@ -48,6 +48,14 @@ eureka:
     registryFetchIntervalSeconds: 5
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
 server:
   port: 9000
   tomcat:

+ 12 - 0
base-servers/account/account-server/src/main/resources/application.yml

@@ -55,6 +55,18 @@ server:
   port: 8580
   tomcat:
     uri-encoding: UTF-8
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+    restart:
+      enabled: true
 info:
   name: '@project.artifactId@'
   description: '@project.description@'

+ 15 - 0
base-servers/auth/auth-server/src/main/resources/application.yml

@@ -35,6 +35,9 @@ spring:
       connection-timeout: 30000
   messages:
     basename: i18n/messages
+  redis:
+    host: 192.168.253.12
+    port: 6379
 eureka:
   instance:
     leaseRenewalIntervalInSeconds: 10
@@ -52,6 +55,18 @@ server:
   port: 8600
   tomcat:
     uri-encoding: UTF-8
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+    restart:
+      enabled: true
 info:
   name: '@project.artifactId@'
   description: '@project.description@'

+ 12 - 0
base-servers/gateway-server/src/main/resources/application.yml

@@ -124,6 +124,18 @@ eureka:
     registryFetchIntervalSeconds: 5
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+    restart:
+      enabled: true
 feign:
   hystrix:
     enabled: true

+ 12 - 0
base-servers/ui-server/src/main/resources/application.yml

@@ -42,6 +42,18 @@ eureka:
     registryFetchIntervalSeconds: 5
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+    restart:
+      enabled: true
 info:
   name: '@project.artifactId@'
   description: '@project.description@'

+ 3 - 0
frontend/saas-web/app/util/FormUtil.js

@@ -110,6 +110,9 @@ Ext.define('saas.util.FormUtil', {
                                 
                                 var editor = c.editor;
                                 if(editor) {
+                                    Ext.applyIf(editor, {
+                                        selectOnFocus: true
+                                    });
                                     if(editor.xtype == 'numberfield') {
                                         Ext.applyIf(editor, {
                                             hideTrigger: true, // 隐藏trigger

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

@@ -114,7 +114,7 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
                             //点开放大镜的行
                             var mainGrid = grid.dbfindtrigger.column.ownerCt.ownerCt;
                             var rec = mainGrid.selModel.getLastSelected();
-                            Ext.Array.each(selectRecordArr,function(record,index) {
+                            Ext.Array.each(selectRecordArr,function(record,_index) {
                                 Ext.Array.each(dbfinds,function(dbfind) {
                                     if(rec){
                                         var nowRec = mainGrid.store.getData().getByKey(rec.id);
@@ -125,7 +125,7 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
                                     return f.id==(rec&&rec.id?rec.id:0)
                                 });
                                 rec = mainGrid.store.data.getAt(index+1);
-                                if(!rec&&index!=selectRecordArr.length-1){//添加下一行
+                                if(!rec&&_index!=selectRecordArr.length-1){//添加下一行
                                     var data = {};
                                     data[mainGrid.ownerCt.detnoColumn] = index + 2;
                                     mainGrid.store.insert(index+1, data);

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

@@ -68,6 +68,7 @@ Ext.define('saas.view.core.form.FormPanel', {
             text: '保存',
             handler: 'onSave',
             bind: {
+                hidden: '{'+ me._statusCodeField + ' == "' + me.auditTexts.auditCode + '"}',
                 // disabled: '{!base.valid || '+ me._statusCodeField + ' == "AUDITED" || ' + me._statusCodeField + ' == "OPEN"}'
                 disabled: '{!base.valid || '+ me._statusCodeField + ' == "' + me.auditTexts.auditCode + '"}'
             }

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

@@ -212,6 +212,28 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
         me.callParent(arguments);
     },
     listeners: {
+        boxready: function(grid, width, height, eOpts) {
+            var store = grid.getStore(),
+            dockedItems = grid.getDockedItems(),
+            toolbar = dockedItems[0],
+            header = dockedItems[1],
+            pagingtoolbar = dockedItems[2];
+
+            var gridEl = grid.el.dom,
+            gridHeight = gridEl.getBoundingClientRect().height,
+            toolbarEl = toolbar.el.dom,
+            toolbarHeight = toolbarEl.getBoundingClientRect().height,
+            headerEl = header.el.dom,
+            headerHeight = headerEl.getBoundingClientRect().height,
+            pagingtoolbarEl = pagingtoolbar.el.dom,
+            pagingtoolbarHeight = pagingtoolbarEl.getBoundingClientRect().height;
+
+            var gridBodyHeight = gridHeight - toolbarHeight - headerHeight - pagingtoolbarHeight;
+
+            var pageSize = Math.floor(gridBodyHeight / 32);
+
+            store.setPageSize(pageSize);
+        },
         itemClick: function(tableView, record, item, index, e, eOpts) {
             if(e.target.parentElement.classList.contains('x-querygrid-code-column')) {
                 var grid = tableView.up('grid'),

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

@@ -110,6 +110,13 @@ Ext.define('saas.view.core.query.QueryPanel', {
             }
         });
 
+        if(columns[columns.length - 1].flex != 1) {
+            columns.push({
+                flex: 1,
+                allowBlank: true
+            });
+        }
+
         me.queryGridConfig['columns']=columns;
         Ext.apply(queryGrid,me.queryGridConfig);
     },

+ 2 - 0
frontend/saas-web/app/view/core/tab/Controller.js

@@ -6,9 +6,11 @@ Ext.define('saas.view.core.tab.Controller', {
         var me = this,
         tab = me.getView(),
         viewType = tab.viewType,
+        _config = tab.index,
         viewConfig = tab.viewConfig;
 
         var view = {
+            _config : viewConfig,
             xtype: viewType
         };
         Ext.apply(view, viewConfig);

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

@@ -21,6 +21,7 @@ Ext.define('saas.view.document.kind.Kind', {
         xtype: 'segmentedbutton',
         reference: 'dataKind',
         value: 'customerkind',
+        name : 'segmentedbutton',
         bind:'{segmented}',
         items: [{
             text: '客户',
@@ -262,6 +263,8 @@ Ext.define('saas.view.document.kind.Kind', {
             reqUrl: '/api/document/warehouse/save',
             delUrl: '/api/document/warehouse/delete'
         }
+    },
+    refresh:function(){
     }
 })
 

+ 4 - 0
frontend/saas-web/app/view/document/kind/KindController.js

@@ -15,6 +15,10 @@ Ext.define('saas.view.document.kind.KindController', {
         }else{
             defaultKind=vm.getData()['dataKind'].value  //类别合并界面
         }
+        if(grid.ownerCt._config){
+            defaultKind = grid.ownerCt._config;
+            vm.setData({'dataKind':{'value':grid.ownerCt._config}});
+        }
         var etc = view.etc[defaultKind];
         var store = vm.getStore(defaultKind);
         store.load();

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

@@ -160,7 +160,7 @@ Ext.define('saas.view.document.product.FormPanel', {
         name : "pr_whcode", 
         bind : "{pr_whcode}", 
         fieldLabel : "仓库编号", 
-        allowBlank : true, 
+        allowBlank : false, 
         columnWidth : 0.25, 
     }, {
         xtype : "textfield", 

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

@@ -83,7 +83,7 @@ Ext.define('saas.view.main.Navigation', {
                     '<div class="menu-content">',
                     '<tpl for="items">',
                     '<div class="menuitem">',
-                    '<div class="item-text" title="{text}" data-id="{id}" data-text="{text}" data-type="query" data-viewType="{viewType}">',
+                    '<div class="item-text" title="{text}" data-config="{config}" data-id="{id}" data-text="{text}" data-type="query" data-viewType="{viewType}">',
                     '{text}',
                     '</div>',
                     '<tpl if="{addType}">',
@@ -142,13 +142,14 @@ Ext.define('saas.view.main.Navigation', {
                                     viewType = dataset.viewtype,
                                     type = dataset.type,
                                     text = dataset.text,
+                                    config = dataset.config,
                                     id = dataset.id;
 
                                     var tabTitle = text + '查询',
                                     tabId = 'maintab-' + type + '-' + id;
 
                                     menu.navItem.classList.remove(menu.navView.overItemCls);
-                                    openTab(viewType, tabTitle, tabId);
+                                    openTab(viewType, tabTitle, tabId,config);
                                     menu.hide();
                                 });
                             });

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

@@ -63,22 +63,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
         xtype : "hidden", 
         name : "pu_delivery", 
         fieldLabel : "交货日期"
-    }, {
-        xtype : "hidden", 
-        name : "pu_buyerid", 
-        bind : "{pu_buyerid}", 
-        fieldLabel : "采购员ID"
-    }, {
-        xtype : "textfield", 
-        name : "pu_buyercode", 
-        fieldLabel : "采购员编号", 
-        hidden:true,
-        columnWidth : 0
-    }, {
-        xtype : "textfield", 
-        name : "pu_buyername", 
-        fieldLabel : "采购员名称"
-    }, {
+    },{
         xtype : "textfield", 
         name : "pu_shipaddresscode", 
         fieldLabel : "交货地址"
@@ -202,13 +187,6 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                     var xr = (new Array(arr[1].length)).fill('0');
                     var format = '0,000.' + xr.join();
                     return Ext.util.Format.number(v, format);
-                },
-                summaryType: 'sum',
-                summaryRenderer: function(v) {
-                    var arr = (v + '.').split('.');
-                    var xr = (new Array(arr[1].length)).fill('0');
-                    var format = '0,000.' + xr.join();
-                    return Ext.util.Format.number(v, format);
                 }
             }, 
             {

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

@@ -118,6 +118,8 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                             from:'pr_detail',to:'pr_detail'
                         },{
                             from:'pr_spec',to:'pr_spec'
+                        },{
+                            from:'pr_purcprice',to:'pd_price'
                         }],
                         //联想设置
                         dbtpls:[{
@@ -158,6 +160,10 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                             "text": "单位",
                             "dataIndex": "pr_spec",
                             "width": 100,
+                        }, {
+                            "text": "最新采购单价",
+                            "dataIndex": "pr_purcprice",
+                            "width": 0,
                         },{
                             "text": "仓库id",
                             "dataIndex": "pr_whid",

+ 10 - 11
frontend/saas-web/app/view/purchase/purchase/QueryPanel.js

@@ -104,9 +104,17 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             xtype: 'numbercolumn',
             hidden:true
         }, {
-            text: '单据编号',
+            text: '采购单号',
             dataIndex: 'pu_code',
             width: 200
+        },{
+            text: '供应商编号',
+            dataIndex: 'pu_vendcode',
+            width: 120
+        },{
+            text: '供应商名称',
+            dataIndex: 'pu_vendname',
+            width: 120
         }, {
             text: '单据状态',
             dataIndex: 'pu_status',
@@ -121,16 +129,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             xtype: 'datecolumn',
             width: 200
         }, {
-            text: '供应商名称',
-            dataIndex: 'pu_vendname',
-            width: 120
-        }, {
-            text: '含税金额',
-            dataIndex: 'pu_taxtotal',
-            xtype: 'numbercolumn',
-            width: 120
-        }, {
-            text: '金额',
+            text: '总额',
             dataIndex: 'pu_total',
             xtype: 'numbercolumn',
             width: 120,

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

@@ -39,11 +39,10 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
         xtype: 'button',
         text: '转采购验退单',
         bind: {
-            hidden: '{!id}'
-        },
+           hidden: '{turnHidden}'
+       },
         handler: 'turnOut'
     }],
-
     defaultItems: [{
         xtype: 'hidden',
         name: 'id',

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

@@ -4,5 +4,13 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelModel', {
     
     data: {
         pi_class: '采购验收单'
-     }
+     },
+     formulas:{
+        turnHidden:{
+            bind:'{pi_statuscode}',
+            get:function(value){
+                return value!='AUDITED';
+            }
+        }
+    }
 });

+ 304 - 0
frontend/saas-web/app/view/stock/stockamount/DataList.js

@@ -0,0 +1,304 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.stock.stockamount.DataList', {
+    extend: 'Ext.grid.Panel',
+    xtype: 'stock-stockamount-datalist',
+    controller: 'stock-stockamount-datalist',
+    viewModel: 'stock-stockamount-datalist',
+    autoScroll: true,
+    frame:true,
+    layout:'fit',
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+    dataUrl:'/api/document/product/ReserveCost',                 
+
+    tbar: [{
+        width: 150,
+        name: 'pr_code',
+        xtype: 'textfield',
+        emptyText : '物料编号'
+    },{
+        width: 150,
+        name: 'pr_detail',
+        xtype: 'textfield',
+        emptyText : '物料名称'
+    },{
+        width: 150,
+        name: 'wh_code',
+        xtype: 'textfield',
+        emptyText : '仓库编号'
+    },{
+        width: 150,
+        name: 'wh_name',
+        xtype: 'textfield',
+        emptyText : '仓库名称'
+    },{
+        cls:'x-formpanel-btn-orange',
+        xtype:'button',
+        text:'查询',
+        listeners: {
+            click:function(b){
+                var grid = b.ownerCt.ownerCt;
+                var tbar = b.ownerCt;
+                grid.condition = '';
+                var items = [];
+                var fields = tbar.items.items.map(f => f.name);
+                Ext.each(fields, function(f, index){
+                    var field = tbar.down('[name='+f+']');
+                    if(field){
+                        items.push(field);
+                    }
+                });
+                grid.condition = grid.getCondition(items);
+                grid.store.loadPage(1);
+            }
+        }
+    },'->'],
+
+    columns : [{
+        text : "物料编号", 
+        width : 150, 
+        dataIndex : "rc_prodCode", 
+        xtype : "", 
+    },{
+        text : "物料名称", 
+        width : 200.0, 
+        dataIndex : "rc_prodDetail", 
+    }, 
+    {
+        text : "物料规格", 
+        dataIndex : "rc_prodSpec", 
+        width : 120.0, 
+    }, 
+    {
+        text : "单位", 
+        dataIndex : "rc_prodUnit", 
+        width : 120.0, 
+    }, 
+    {
+        text : "仓库编号", 
+        dataIndex : "rc_whCode", 
+        width : 0, 
+    }, 
+    {
+        text : "仓库名称", 
+        dataIndex : "rc_whName", 
+        width : 120.0, 
+    }, 
+    {
+        text : "数量", 
+        format:'0,000',
+        xtype:'numbercolumn',
+        dataIndex : "rc_number", 
+        width : 120.0, 
+    }, 
+    {
+        text : "单价", 
+        dataIndex : "rc_price", 
+        width : 120.0, 
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length>8?8:arr[1].length)).fill('0');
+            var format = '0.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
+    }, 
+    {
+        text : "金额", 
+        dataIndex : "rc_amount", 
+        flex : 1.0, 
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length>2?2:arr[1].length)).fill('0');
+            var format = '0.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        },
+    }],
+
+    dbSearchFields: [],
+    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);
+    },
+
+    getGridSelected:function(type){
+        var isErrorSelect = false;
+        var checkField = this.statusCodeField;
+        var me = this,
+        items = me.selModel.getSelection(),
+        data = new Array() ;
+        Ext.each(items, function(item, index){
+            if(!Ext.isEmpty(item.data[me.idField])){
+                var o = new Object();
+                if(me.idField){
+                    o['id'] = item.data[me.idField];
+                }
+                if(me.codeField){
+                    o['code'] = item.data[me.codeField];
+                }
+                if(type&&type==item.data[checkField]){
+                    isErrorSelect = true
+                }
+                data.push(o);
+            }
+        });
+        if(isErrorSelect){
+            return false;
+        }
+		return data;
+    },
+
+    /**
+     * 获得过滤条件
+     */
+    getCondition: function(items) {
+        var me = this,
+        conditions = [];
+
+        for(var i = 0; i < items.length; i++) {
+            var item = items[i];
+            var field = item.name,
+            func = item.getCondition,
+            value = item.value,
+            condition;
+
+            if(typeof func == 'function') {
+                condition = {
+                    type: 'condition',
+                    value: func(value)
+                }
+            }else {
+                var xtype = item.xtype || 'textfield',
+                type = item.fieldType || me.getDefaultFieldType(xtype),
+                operation = item.operation || me.getDefaultFieldOperation(xtype),
+                conditionValue = me.getConditionValue(xtype, value);
+    
+                if(!conditionValue) {
+                    continue;
+                }
+                condition = {
+                    type: type,
+                    field: field,
+                    operation: operation,
+                    value: conditionValue
+                }
+            }
+            conditions.push(condition);
+        };
+        return conditions;
+    },
+
+    getDefaultFieldType: function(xtype) {
+        var type;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            type = 'number';
+        }else if(Ext.Array.contains(['datefield', 'condatefield'], xtype)) {
+            type = 'date';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo', 'radiofield', 'radio'], xtype)) {
+            type = 'enum';
+        }else {
+            type = 'string';
+        }
+
+        return type;
+    },
+
+    getDefaultFieldOperation: function(xtype) {
+        var operation;
+
+        if(Ext.Array.contains(['numberfield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['datefield'], xtype)) {
+            operation = '=';
+        }else if(Ext.Array.contains(['condatefield'], xtype)) {
+            operation = 'between';
+        }else if(Ext.Array.contains(['combobox', 'multicombo', 'combo'], xtype)) {
+            operation = 'in';
+        }else {
+            operation = 'like';
+        }
+
+        return operation;
+    },
+
+    /**
+     * 处理部分字段值
+     */
+    getConditionValue: function(xtype, value) {
+        var conditionValue;
+        if(xtype == 'datefield') {
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
+        }else if(xtype == 'condatefield') {
+            var from = value.from,
+            to = value.to;
+
+            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
+        }else if(xtype == 'combobox' || xtype == 'combo') {
+            conditionValue = '\'' + value + '\'';
+        }else if(xtype == 'multicombo') {
+            conditionValue = value.map(function(v) {
+                return '\'' + v.value + '\'';
+            }).join(',');
+        }else {
+            conditionValue = value;
+        }
+
+        return conditionValue;
+    },
+
+    refresh:function(){
+        //debugger
+    }
+
+})
+
+

+ 10 - 0
frontend/saas-web/app/view/stock/stockamount/DataListController.js

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

+ 4 - 0
frontend/saas-web/app/view/stock/stockamount/DataListlModel.js

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

+ 47 - 21
frontend/saas-web/app/view/sys/config/FormPanel.js

@@ -4,25 +4,28 @@ Ext.define('saas.view.sys.config.FormPanel', {
 
     controller: 'sys-config-formpanel',
     viewModel: 'sys-config-formpanel',
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
     
     //字段属性
     _idField: 'id',
-    _readUrl:'/api/document/vendor/read/',
-    _saveUrl:'/api/document/vendor/save',
+    _readUrl:'/api/commons/enterprise/read',
+    _saveUrl:'/api/commons/enterprise/save',
 
     //基础属性
     frame:true,
     initId: 0,
-    layout: 'column',
+    layout: 'vbox',
     autoScroll: true,
     border: 1,
     bodyPadding: 5,
 
     fieldDefaults: {
-        margin: '0 5 5 0',
+        margin: '0 5 5 30',
         labelAlign: 'right',
         labelWidth: 90,
-        columnWidth: 0.25,
+        width:300,
         blankText: '该字段不能为空'
     },
 
@@ -33,50 +36,60 @@ Ext.define('saas.view.sys.config.FormPanel', {
         frame:true,
         items:['->',{
             text:'保存',
-            handler:function(){
-
-            }
+            formBind:true,
+            name:'save'
         }]
     },
 
     items: [{
+        bind:'{companyId}',
         xtype: 'hidden',
-        name: 'id',
+        name: 'companyId',
         fieldLabel: 'id',
         allowBlank: true,
-        columnWidth: 0.25
+        width:600
     },{
+        bind:'{en_name}',
         xtype: 'textfield',
         name: 'en_name',
         fieldLabel: '公司名称',
-        allowBlank: false,
-        columnWidth: 0.5
+        allowBlank: true,
+        editable:false,
+        readOnly:true,
+        width:600
     },{
+        bind:'{en_address}',
         xtype: 'textfield',
         name: 'en_address',
         fieldLabel: '公司地址',
-        allowBlank: true,
-        columnWidth: 0.5
+        allowBlank: false,
+        width:600
     },{
+        bind:'{en_tel}',
         xtype: 'textfield',
         name: 'en_tel',
         fieldLabel: '电话',
-        allowBlank: true,
+        allowBlank: false,
         columnWidth: 0.25
     },{
+        bind:'{en_fax}',
         xtype: 'textfield',
         name: 'en_fax',
         fieldLabel: '传真',
         allowBlank: true,
         columnWidth: 0.5
     },{
+        bind:'{en_begindate}',
         xtype : "datefield", 
-        name : "en_begindate", 
+        name : "en_begindate",
+        format:'Y-m-d H:i:s', 
         fieldLabel : "开账日期", 
         allowBlank : true, 
         editable:false,
-        columnWidth : 0.25
+        hideTrigger:true,
+        readOnly:true
     },{ 
+        bind:'{en_pricemethod}',
         displayField : "display", 
         editable:false,
         hideTrigger : false, 
@@ -97,6 +110,7 @@ Ext.define('saas.view.sys.config.FormPanel', {
         allowBlank : false, 
         columnWidth : 0.25
     },{  
+        bind:'{en_signet}',
         xtype : "textfield", 
         name : "en_signet", 
         fieldLabel : "打印章上传", 
@@ -104,22 +118,34 @@ Ext.define('saas.view.sys.config.FormPanel', {
         editable:false,
         columnWidth : 0.25
     },{  
+        ignore:true,
+        bind:'{updateTime}',
         xtype : "datefield", 
         name : "updateTime", 
         fieldLabel : "更新时间", 
         allowBlank : true, 
+        hideTrigger:true,
+        format:'Y-m-d H:i:s',
         editable:false,
+        readOnly:true,
         columnWidth : 0.25
     }],
 
     initComponent: function () {
         var me = this,
         viewModel = me.getViewModel();
+        var url = me._readUrl;
+        me.BaseUtil.request({url })
+        .then(function(res) {
+            if(res.success) {
+                var d = res.data;
+                viewModel.setData(d)
+            }
+        })
+        .catch(function(response) {
+            console.error(response);
+        });
 
-        viewModel.set('createTime', Ext.Date.format(new Date(), 'Y-m-d H:i:s'));
-        viewModel.set('updateTime', Ext.Date.format(new Date(), 'Y-m-d H:i:s'));
-        viewModel.setFormulas(o);
-        viewModel.set(statusCodeField, auditTexts.unAuditCode);
         me.callParent(arguments);
     }
 });

+ 28 - 36
frontend/saas-web/app/view/sys/config/FormPanelController.js

@@ -5,6 +5,17 @@ Ext.define('saas.view.sys.config.FormPanelController', {
     BaseUtil: Ext.create('saas.util.BaseUtil'),
     FormUtil: Ext.create('saas.util.FormUtil'),
 
+    init: function (form) {
+        var me = this;
+        this.control({
+            'button[name=save]':{
+                click:function(){
+                    me.onSave();
+                }
+            }
+        });
+    },
+
     onSave: function() {
         var me = this,
         form = this.getView();
@@ -19,50 +30,31 @@ Ext.define('saas.view.sys.config.FormPanelController', {
             showToast('未修改数据,请修改后保存');
             return false;
         }
-        //form里面数据
-        var formData = form.getFormData();
         
-        me.save(formData);
-    },
-
-    save:function(formData){
-        var me = this,
-        form = this.getView(),
-        detailCount = form.detailCount,
-        viewModel = me.getViewModel(),
-        modelData = viewModel.getData();
-
-        var params = {
-            main:formData.main
-        };
-
-        for(var i = 0; i < detailCount; i++) {
-            params['items' + ( i + 1)] = formData['detail' + i];
-        }
-
-        // 只有一个从表时从表字段改为items
-        if(detailCount == 1) {
-            params.items = params.items1;
-            delete params.items1;
-        }
-
+        viewModel = me.getViewModel();
+        var formData = viewModel.data;
+        formData.en_name = null;
+        formData.updateTime = null;
         me.BaseUtil.request({
             url: form._saveUrl,
-            params: JSON.stringify(params),
+            params: JSON.stringify(formData),
             method: 'POST',
         })
         .then(function(localJson) {
             if(localJson.success){
-                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);
+                viewModel = form.getViewModel();
+                var url = form._readUrl;
+                form.BaseUtil.request({url })
+                .then(function(res) {
+                    if(res.success) {
+                        var d = res.data;
+                        viewModel.setData(d)
+                    }
+                })
+                .catch(function(response) {
+                    console.error(response);
+                });
             }
         })
         .catch(function(res) {

+ 20 - 9
frontend/saas-web/app/view/sys/finish/DataList.js

@@ -7,9 +7,9 @@ Ext.define('saas.view.sys.finish.DataList', {
     autoScroll: true,
     frame:true,
     layout:'fit',
-    dataUrl:'http://192.168.253.31:8920/endProduct/list',
-    endAccount:'http://192.168.253.31:8920/endProduct/endAccount',
-    unEndAccount:'http://192.168.253.31:8920/endProduct/unEndAccount',
+    dataUrl:'/api/commons/endProduct/list',
+    endAccount:'/api/commons/endProduct/endAccount',
+    unEndAccount:'/api/commons/endProduct/unEndAccount',
     tbar: [{
         cls:'x-tbar-display',
         width: 180,
@@ -80,20 +80,31 @@ Ext.define('saas.view.sys.finish.DataList', {
         dataIndex : "id", 
         xtype : "numbercolumn",   
     },{
-        text:'结账',
-        dataIndex : "ml_caller",
-        xtype:'datecolumn',
-        width : 200.0, 
+        text:'结账期间',
+        dataIndex : "ml_keyvalue",
+        xtype:'',
+        width : 160.0, 
     },{
         text : "操作日期", 
         width : 200.0, 
-        dataIndex : "ml_code", 
+        format:'Y-m-d H:i:s',
+        dataIndex : "createTime", 
         xtype:'datecolumn',
     }, 
     {
-        text : "操作", 
+        text : "操作类型", 
         dataIndex : "ml_content", 
         width : 220.0, 
+    },
+    {
+        text : "操作员", 
+        dataIndex : "ml_man", 
+        width : 170.0, 
+    },
+    {
+        text : "结果", 
+        dataIndex : "ml_result", 
+        width : 220.0, 
     }],
 
     condition:'',

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

@@ -106,7 +106,9 @@
         }, {
             "text": "物料收发汇总表"
         }, {
-            "text": "物料库存数量金额表"
+            "text": "物料库存数量金额表",
+            "id":"stock-stockamount-datalist",
+            "viewType": "stock-stockamount-datalist"
         }]
     }]
 }, {
@@ -206,6 +208,7 @@
     }, {
         "text": "辅助资料",
         "items": [{
+            "config":"vendorkind",
             "id":"document-kind",
             "text": "供应商类型",
             "viewType": "document-kind",
@@ -216,6 +219,7 @@
             "viewType": "other-address",
             "leaf": true
         }, {
+            "index":"customer",
             "id":"document-kind",
             "text": "客户类型",
             "viewType": "document-kind",