瀏覽代碼

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

hy 7 年之前
父節點
當前提交
10e48410e0
共有 39 個文件被更改,包括 691 次插入313 次删除
  1. 2 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java
  2. 4 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  3. 3 3
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  4. 9 8
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  5. 9 8
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  6. 2 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java
  7. 1 4
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  8. 2 5
      applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml
  9. 78 74
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/StocktakingServiceImpl.java
  10. 5 1
      base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/api/SsoUserApi.java
  11. 37 0
      base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/auth/Signature.java
  12. 11 0
      base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/auth/feign/SignatureConstant.java
  13. 30 0
      base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/auth/feign/SignatureContract.java
  14. 43 0
      base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/auth/feign/SignatureInterceptor.java
  15. 28 0
      base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/config/SsoFeignConfig.java
  16. 2 2
      base-servers/auth/sso-api/src/test/resources/application.yml
  17. 1 0
      frontend/saas-portal-web/config/dev.env.js
  18. 1 1
      frontend/saas-portal-web/src/App.vue
  19. 14 7
      frontend/saas-portal-web/src/components/conenter/addgongsi.vue
  20. 55 28
      frontend/saas-portal-web/src/components/conenter/company.vue
  21. 23 8
      frontend/saas-portal-web/src/components/conenter/enterprise.vue
  22. 26 8
      frontend/saas-portal-web/src/components/conenter/home.vue
  23. 0 1
      frontend/saas-portal-web/src/main.js
  24. 1 1
      frontend/saas-portal-web/src/router/index.js
  25. 1 0
      frontend/saas-portal-web/src/store/index.js
  26. 0 1
      frontend/saas-portal-web/static/css/gongsi.css
  27. 1 1
      frontend/saas-portal-web/static/css/main.css
  28. 4 4
      frontend/saas-portal-web/static/js/mains.js
  29. 1 1
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  30. 60 21
      frontend/saas-web/app/view/money/payBalance/QueryPanel.js
  31. 1 1
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  32. 51 10
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  33. 27 27
      frontend/saas-web/app/view/money/report/CustomerCheck.js
  34. 26 26
      frontend/saas-web/app/view/money/report/VendorCheck.js
  35. 34 1
      frontend/saas-web/app/view/money/verification/FormPanel.js
  36. 6 2
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  37. 6 2
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  38. 81 49
      frontend/saas-web/app/view/stock/inventory/EditDataList.js
  39. 5 2
      frontend/saas-web/app/view/stock/make/FormPanelController.js

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

@@ -290,8 +290,8 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
             fundtransfer.setFt_status(com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay());
             fundtransfer.setFt_statuscode(Status.AUDITED.name());
             Fundtran fundtran = this.select(Math.toIntExact(fundtransfer.getId()));
-            this.changBankUntil(fundtran);
-            this.insert(fundtran);
+//            this.changBankUntil(fundtran);
+            this.audit(fundtran);
 //            fundtransferMapper.updateByPrimaryKeySelective(fundtransfer);
         }
     }

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

@@ -137,7 +137,7 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
         Double or_amount = othreceipts.getOr_amount();
         //收款
         Bankinformation bankinformation = bankinformationMapper.selectByPrimaryKey(bk_inid);
-        Double beginamount = bankinformation.getBk_beginamount();
+        Double beginamount = bankinformation.getBk_beginamount() == null ? new Double(0) : bankinformation.getBk_beginamount();
         Double spending = bankinformation.getBk_spending() == null ? new Double(0) : bankinformation.getBk_spending();
         Double incomme = bankinformation.getBk_income() == null ? new Double(0) : bankinformation.getBk_income();
         bankinformation.setBk_thisamount(beginamount + incomme - spending + or_amount);
@@ -234,7 +234,7 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
         Double or_amount = othreceipts.getOr_amount();
         //收款
         Bankinformation bankinformation = bankinformationMapper.selectByPrimaryKey(bk_inid);
-        Double beginamount = bankinformation.getBk_beginamount();
+        Double beginamount = bankinformation.getBk_beginamount() == null ? new Double(0) : bankinformation.getBk_beginamount();
         Double spending = bankinformation.getBk_spending() == null ? new Double(0) : bankinformation.getBk_spending();
         Double incomme = bankinformation.getBk_income() == null ? new Double(0) : bankinformation.getBk_income();
         bankinformation.setBk_thisamount(beginamount + incomme - spending - or_amount);
@@ -342,8 +342,8 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
             othreceipts.setOr_status(com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay());
             othreceipts.setOr_statuscode(Status.AUDITED.name());
             Othte othte = this.select(Math.toIntExact(othreceipts.getId()));
-            this.changBankUntil(othte);
-            this.insert(othte);
+//            this.changBankUntil(othte);
+            this.audit(othte);
 //            othreceiptsMapper.updateByPrimaryKeySelective(othreceipts);
         }
     }

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

@@ -267,7 +267,7 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
         Double bk_amount = othspendings.getOs_amount();
         //付款方
         Bankinformation bankinformation = bankinformationMapper.selectByPrimaryKey(bk_id);
-        Double beginamount = bankinformation.getBk_beginamount();
+        Double beginamount = bankinformation.getBk_beginamount() == null ? new Double(0) : bankinformation.getBk_beginamount();
         Double spending = bankinformation.getBk_spending() == null ? new Double(0) : bankinformation.getBk_spending();
         Double incomme = bankinformation.getBk_income() == null ? new Double(0) : bankinformation.getBk_income();
         bankinformation.setBk_thisamount(beginamount + incomme - spending + bk_amount);
@@ -337,8 +337,8 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
             othspendings.setOs_status(com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay());
             othspendings.setOs_statuscode(Status.AUDITED.name());
             Othsp othsp = this.select(Math.toIntExact(othspendings.getId()));
-            this.changBankUntil(othsp);
-            this.insert(othsp);
+//            this.changBankUntil(othsp);
+            this.audit(othsp);
 //            othspendingsMapper.updateByPrimaryKeySelective(othspendings);
         }
     }

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

@@ -446,14 +446,15 @@ public class PaybalanceServiceImpl extends CommonBaseServiceImpl<PaybalanceMappe
             paybalance.setPb_status(com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay());
             paybalance.setPb_statuscode(Status.AUDITED.name());
             Pay pay = this.select(Math.toIntExact(paybalance.getId()));
-            Subledger subledger = this.changSubledgerUntil(pay.getMain());
-            if (subledger.getSl_code() == null){
-                subledgerMapper.insertSelective(subledger);
-            }else {
-                subledgerMapper.updateByPrimaryKeySelective(subledger);
-            }
-            this.changBankUntil(pay);
-            paybalanceMapper.updateByPrimaryKeySelective(paybalance);
+            this.audit(pay);
+//            Subledger subledger = this.changSubledgerUntil(pay.getMain());
+//            if (subledger.getSl_code() == null){
+//                subledgerMapper.insertSelective(subledger);
+//            }else {
+//                subledgerMapper.updateByPrimaryKeySelective(subledger);
+//            }
+//            this.changBankUntil(pay);
+//            paybalanceMapper.updateByPrimaryKeySelective(paybalance);
         }
     }
 

+ 9 - 8
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java

@@ -451,14 +451,15 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
             recbalance.setRb_status(com.usoftchina.saas.commons.po.Status.AUDITED.getDisplay());
             recbalance.setRb_statuscode(Status.AUDITED.name());
             Rec rec = this.select(Math.toIntExact(recbalance.getId()));
-            Subledger subledger = this.changSubledgerUntil(rec.getMain());
-            if (subledger.getSl_code() == null){
-                subledgerMapper.insertSelective(subledger);
-            }else {
-                subledgerMapper.updateByPrimaryKeySelective(subledger);
-            }
-            this.changBankUntil(rec);
-            recbalanceMapper.updateByPrimaryKeySelective(recbalance);
+            this.audit(rec);
+//            Subledger subledger = this.changSubledgerUntil(rec.getMain());
+//            if (subledger.getSl_code() == null){
+//                subledgerMapper.insertSelective(subledger);
+//            }else {
+//                subledgerMapper.updateByPrimaryKeySelective(subledger);
+//            }
+//            this.changBankUntil(rec);
+//            recbalanceMapper.updateByPrimaryKeySelective(recbalance);
         }
     }
 

+ 2 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java

@@ -695,6 +695,7 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
      */
     private void updateResAuditCustomer(VerificationDTO verificationDTO){
         String kind = verificationDTO.getVc_kind();
+        kind = transferKind(kind);
         if(kind.equals("receipts_offset_receivable")){
             Customer customerData = recbalanceMapper.selectCustomerByPrimaryKey(verificationDTO.getVc_custid());
             Double preamount = customerData.getCu_preamount()==null?new Double(0):customerData.getCu_preamount();
@@ -780,6 +781,7 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
      */
     private void updateResAuditVendor(VerificationDTO verificationDTO){
         String kind = verificationDTO.getVc_kind();
+        kind = transferKind(kind);
         if(kind.equals("prepaid_offset_payable")){
             Vendor vendorData = paybalanceMapper.selectVendorByPrimaryKey(verificationDTO.getVc_vendid());
             Double preamount = vendorData.getVe_preamount()==null?new Double(0):vendorData.getVe_preamount();

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

@@ -114,8 +114,7 @@
     ve_leftamount
   </sql>
   <sql id="detail_Column_List">
-    pd_bankname,pd_amount,pd_paymethod,pd_remark,pbd_slcode,pbd_slkind,
-    pbd_sldate,pbd_amount,pbd_nowbalance
+    pd_bankname,pd_amount,pd_paymethod,pd_remark
   </sql>
   <select id="selectList" resultMap="BaseResultMap">
     select
@@ -459,7 +458,6 @@
     <include refid="Base_Column_List" />,
     <include refid="detail_Column_List" />
     from paybalance left join paybalancedet on pd_pbid=pb_id and paybalance.companyId=paybalancedet.companyId
-    left join paybalancedetail on pbd_pbid=pb_id and paybalancedetail.companyId=paybalance.companyId
     <where>
       <if test="con != null">
         ${con}
@@ -475,7 +473,6 @@
     <include refid="Base_Column_List" />,
     <include refid="detail_Column_List" />
     from paybalance left join paybalancedet on pd_pbid=pb_id and paybalance.companyId=paybalancedet.companyId
-    left join paybalancedetail on pbd_pbid=pb_id and paybalancedetail.companyId=paybalance.companyId
     <where>
       <if test="con != null">
         ${con}

+ 2 - 5
applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml

@@ -114,8 +114,7 @@
     cu_leftamount
   </sql>
   <sql id="detail_Column_List">
-      rd_bankname,rd_amount,rd_paymethod,rd_paycode,rd_remark,rbd_slcode,rbd_slkind,
-    rbd_sldate,rbd_amount,rbd_nowbalance
+      rd_bankname,rd_amount,rd_paymethod,rd_paycode,rd_remark
   </sql>
 
   <select id="selectByExample" parameterType="com.usoftchina.saas.money.po.RecbalanceExample" resultMap="BaseResultMap">
@@ -145,7 +144,6 @@
     <include refid="Base_Column_List" />,
     <include refid="detail_Column_List" />
     from recbalance left join recbalancedet on rd_rbid=rb_id and recbalance.companyId=recbalancedet.companyId
-    left join recbalancedetail on rbd_rbid=rb_id and recbalancedetail.companyId=recbalance.companyId
     <where>
       <if test="con != null">
         ${con}
@@ -160,8 +158,7 @@
     select
     <include refid="Base_Column_List" />,
     <include refid="detail_Column_List" />
-    from recbalance left join recbalancedet on rd_rbid=rb_id and recbalance.comranyId=recbalancedet.comranyId
-    left join recbalancedetail on rbd_rbid=rb_id and recbalancedetail.comranyId=recbalance.comranyId
+    from recbalance left join recbalancedet on rd_rbid=rb_id and recbalance.companyId=recbalancedet.companyId
     <where>
       <if test="con != null">
         ${con}

+ 78 - 74
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/StocktakingServiceImpl.java

@@ -84,89 +84,93 @@ public class StocktakingServiceImpl extends CommonBaseServiceImpl<StockTakingMap
     @Transactional
     public Map<String,Object> stock() {
         Map<String,Object> resultMap = new HashMap();
-
         Long companyId = BaseContextHolder.getCompanyId();
         Long userId = BaseContextHolder.getUserId();
+        String userName = BaseContextHolder.getUserName();
         //生成入库单
-        ProdInOut prodIn = new ProdInOut();
-        String piInno = getMaxnumber(BillCodeSeq.OTHERIN);
-        prodIn.setPi_inoutno(piInno);
-        prodIn.setPi_class(BillCodeSeq.OTHERIN.getName());
-        prodIn.setPi_date(new Date());
-        prodIn.setPi_status("未审核");
-        prodIn.setPi_statuscode("UNAUDITED");
-        prodIn.setCompanyId(companyId);
-        prodIn.setCreateTime(new Date());
-        prodIn.setCreatorId(userId);
-        prodIn.setPi_remark("盘盈单");
-        prodInOutMapper.insertSelective(prodIn);
-        long inid = prodIn.getId();
-
-        Double purcprice = null;
-
         List<StockTaking> inlist  = getMapper().selectStockTakingBycondition("st_num>0",companyId);
-        for (int i=0;i<inlist.size();i++) {
-            StockTaking st = inlist.get(i);
-            ProdIODetail prodInDetail = new ProdIODetail();
-            prodInDetail.setPd_piid(inid);
-            prodInDetail.setPd_inoutno(piInno);
-            prodInDetail.setPd_piclass(BillCodeSeq.OTHERIN.getName());
-            prodInDetail.setPd_pdno(i+1);
-
-            purcprice = getMapper().getPurcpriceByProduct(st.getSt_prodid());
-            prodInDetail.setPd_orderprice(purcprice==null?0:purcprice);
-            prodInDetail.setPd_prodid(st.getSt_prodid());
-            prodInDetail.setPd_prodcode(st.getSt_prodcode());
-            prodInDetail.setPd_inqty(st.getSt_num());
-            //仓库
-            prodInDetail.setPd_whid(st.getSt_whid());
-            prodInDetail.setPd_whcode(st.getSt_whcode());
-            prodInDetail.setPd_whname(st.getSt_whname());
-            prodInDetail.setCompanyId(companyId);
-            prodInDetail.setCreateTime(new Date());
-            prodInDetail.setCreatorId(userId);
-            prodIODetailMapper.insertSelective(prodInDetail);
+        if (inlist.size()>0){
+            ProdInOut prodIn = new ProdInOut();
+            String piInno = getMaxnumber(BillCodeSeq.OTHERIN);
+            prodIn.setPi_inoutno(piInno);
+            prodIn.setPi_class(BillCodeSeq.OTHERIN.getName());
+            prodIn.setPi_date(new Date());
+            prodIn.setPi_status("未审核");
+            prodIn.setPi_statuscode("UNAUDITED");
+            prodIn.setCompanyId(companyId);
+            prodIn.setCreateTime(new Date());
+            prodIn.setCreatorId(userId);
+            prodIn.setPi_remark("盘盈单");
+            prodInOutMapper.insertSelective(prodIn);
+            long inid = prodIn.getId();
+            //更新录入人
+            prodInOutMapper.updateCreator(userId,userName,inid);
+            Double purcprice = null;
+            for (int i=0;i<inlist.size();i++) {
+                StockTaking st = inlist.get(i);
+                ProdIODetail prodInDetail = new ProdIODetail();
+                prodInDetail.setPd_piid(inid);
+                prodInDetail.setPd_inoutno(piInno);
+                prodInDetail.setPd_piclass(BillCodeSeq.OTHERIN.getName());
+                prodInDetail.setPd_pdno(i+1);
+                purcprice = getMapper().getPurcpriceByProduct(st.getSt_prodid());
+                prodInDetail.setPd_orderprice(purcprice==null?0:purcprice);
+                prodInDetail.setPd_prodid(st.getSt_prodid());
+                prodInDetail.setPd_prodcode(st.getSt_prodcode());
+                prodInDetail.setPd_inqty(st.getSt_num());
+                //仓库
+                prodInDetail.setPd_whid(st.getSt_whid());
+                prodInDetail.setPd_whcode(st.getSt_whcode());
+                prodInDetail.setPd_whname(st.getSt_whname());
+                prodInDetail.setCompanyId(companyId);
+                prodInDetail.setCreateTime(new Date());
+                prodInDetail.setCreatorId(userId);
+                prodIODetailMapper.insertSelective(prodInDetail);
+            }
+            DocBaseDTO baseDTOIN = new DocBaseDTO(inid,piInno,"其它入库单");
+            resultMap.put("inData",baseDTOIN);
         }
 
         //生成出库单
-        ProdInOut prodOut = new ProdInOut();
-        String piOutno = getMaxnumber(BillCodeSeq.OTHEROUT);
-        prodOut.setPi_inoutno(piOutno);
-        prodOut.setPi_class(BillCodeSeq.OTHEROUT.getName());
-        prodOut.setPi_date(new Date());
-        prodOut.setPi_status("未审核");
-        prodOut.setPi_statuscode("UNAUDITED");
-        prodOut.setCompanyId(companyId);
-        prodOut.setCreateTime(new Date());
-        prodOut.setCreatorId(userId);
-        prodOut.setPi_remark("盘亏单");
-        prodInOutMapper.insertSelective(prodOut);
-        long outid = prodOut.getId();
-
         List<StockTaking> outlist  = getMapper().selectStockTakingBycondition("st_num<0",companyId);
-        for (int i=0;i<outlist.size();i++) {
-            StockTaking st = outlist.get(i);
-            ProdIODetail prodOutDetail = new ProdIODetail();
-            prodOutDetail.setPd_piid(outid);
-            prodOutDetail.setPd_inoutno(piOutno);
-            prodOutDetail.setPd_piclass(BillCodeSeq.OTHERIN.getName());
-            prodOutDetail.setPd_pdno(i+1);
-            prodOutDetail.setPd_prodid(st.getSt_prodid());
-            prodOutDetail.setPd_prodcode(st.getSt_prodcode());
-            prodOutDetail.setPd_outqty(-st.getSt_num());
-            //仓库
-            prodOutDetail.setPd_whid(st.getSt_whid());
-            prodOutDetail.setPd_whcode(st.getSt_whcode());
-            prodOutDetail.setPd_whname(st.getSt_whname());
-            prodOutDetail.setCompanyId(companyId);
-            prodOutDetail.setCreateTime(new Date());
-            prodOutDetail.setCreatorId(userId);
-            prodIODetailMapper.insertSelective(prodOutDetail);
+        if (outlist.size()>0){
+            ProdInOut prodOut = new ProdInOut();
+            String piOutno = getMaxnumber(BillCodeSeq.OTHEROUT);
+            prodOut.setPi_inoutno(piOutno);
+            prodOut.setPi_class(BillCodeSeq.OTHEROUT.getName());
+            prodOut.setPi_date(new Date());
+            prodOut.setPi_status("未审核");
+            prodOut.setPi_statuscode("UNAUDITED");
+            prodOut.setCompanyId(companyId);
+            prodOut.setCreateTime(new Date());
+            prodOut.setCreatorId(userId);
+            prodOut.setPi_remark("盘亏单");
+            prodInOutMapper.insertSelective(prodOut);
+            long outid = prodOut.getId();
+            //更新录入人
+            prodInOutMapper.updateCreator(userId,userName,outid);
+            for (int i=0;i<outlist.size();i++) {
+                StockTaking st = outlist.get(i);
+                ProdIODetail prodOutDetail = new ProdIODetail();
+                prodOutDetail.setPd_piid(outid);
+                prodOutDetail.setPd_inoutno(piOutno);
+                prodOutDetail.setPd_piclass(BillCodeSeq.OTHERIN.getName());
+                prodOutDetail.setPd_pdno(i+1);
+                prodOutDetail.setPd_prodid(st.getSt_prodid());
+                prodOutDetail.setPd_prodcode(st.getSt_prodcode());
+                prodOutDetail.setPd_outqty(-st.getSt_num());
+                //仓库
+                prodOutDetail.setPd_whid(st.getSt_whid());
+                prodOutDetail.setPd_whcode(st.getSt_whcode());
+                prodOutDetail.setPd_whname(st.getSt_whname());
+                prodOutDetail.setCompanyId(companyId);
+                prodOutDetail.setCreateTime(new Date());
+                prodOutDetail.setCreatorId(userId);
+                prodIODetailMapper.insertSelective(prodOutDetail);
+            }
+            DocBaseDTO baseDTOOUT = new DocBaseDTO(outid,piOutno,"其它出库单");
+            resultMap.put("outData",baseDTOOUT);
         }
-        DocBaseDTO baseDTOIN = new DocBaseDTO(inid,piInno,"其它入库单");
-        DocBaseDTO baseDTOOUT = new DocBaseDTO(outid,piOutno,"其它出库单");
-        resultMap.put("inData",baseDTOIN);
-        resultMap.put("outData",baseDTOOUT);
         return resultMap;
     }
 

+ 5 - 1
base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/api/SsoUserApi.java

@@ -1,5 +1,7 @@
 package com.usoftchina.sso.api;
 
+import com.usoftchina.sso.auth.Signature;
+import com.usoftchina.sso.config.SsoFeignConfig;
 import com.usoftchina.sso.dto.SsoResult;
 import com.usoftchina.sso.dto.SsoUser;
 import com.usoftchina.sso.dto.SsoUserSpaceList;
@@ -13,7 +15,8 @@ import org.springframework.web.bind.annotation.RequestParam;
  * @author yingp
  * @date 2018/11/23
  */
-@FeignClient(url = "${sso.base-url}", name = "sso-server", fallback = SsoUserApi.DefaultFallback.class)
+@FeignClient(url = "${sso.base-url}", name = "sso-server", configuration = SsoFeignConfig.class,
+        fallback = SsoUserApi.DefaultFallback.class)
 @RequestMapping("/api/user")
 public interface SsoUserApi {
 
@@ -33,6 +36,7 @@ public interface SsoUserApi {
      * @return
      */
     @GetMapping("/getSpace")
+    @Signature
     @Deprecated
     SsoUserSpaceList getUserSpacesByMobile(@RequestParam("mobile") String mobile);
 

+ 37 - 0
base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/auth/Signature.java

@@ -0,0 +1,37 @@
+package com.usoftchina.sso.auth;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 自动添加签名串
+ *
+ * @author yingp
+ * @date 2018/11/23
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Signature {
+    /**
+     * 签名参数
+     *
+     * @return
+     */
+    String value() default "_signature";
+
+    /**
+     * 添加时间戳参数
+     *
+     * @return
+     */
+    boolean withTimestamp() default true;
+
+    /**
+     * 时间戳参数
+     *
+     * @return
+     */
+    String timestampParam() default "_timestamp";
+}

+ 11 - 0
base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/auth/feign/SignatureConstant.java

@@ -0,0 +1,11 @@
+package com.usoftchina.sso.auth.feign;
+
+/**
+ * @author yingp
+ * @date 2018/11/23
+ */
+public class SignatureConstant {
+    public final static String WITH_TIMESTAMP_HEADER = "X-With-Timestamp";
+
+    public final static String WITH_SIGNATURE_HEADER = "X-With-Signature";
+}

+ 30 - 0
base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/auth/feign/SignatureContract.java

@@ -0,0 +1,30 @@
+package com.usoftchina.sso.auth.feign;
+
+import com.usoftchina.sso.auth.Signature;
+import feign.MethodMetadata;
+import org.springframework.cloud.openfeign.support.SpringMvcContract;
+import org.springframework.core.annotation.AnnotatedElementUtils;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+
+import static com.usoftchina.sso.auth.feign.SignatureConstant.*;
+
+/**
+ * @author yingp
+ * @date 2018/11/23
+ */
+public class SignatureContract extends SpringMvcContract{
+
+    @Override
+    protected void processAnnotationOnMethod(MethodMetadata data, Annotation methodAnnotation, Method method) {
+        super.processAnnotationOnMethod(data, methodAnnotation, method);
+        if (Signature.class.isInstance(methodAnnotation) || methodAnnotation.annotationType().isAnnotationPresent(Signature.class)) {
+            Signature signature = AnnotatedElementUtils.findMergedAnnotation(method, Signature.class);
+            if (signature.withTimestamp()) {
+                data.template().header(WITH_TIMESTAMP_HEADER, signature.timestampParam());
+            }
+            data.template().header(WITH_SIGNATURE_HEADER, signature.value());
+        }
+    }
+}

+ 43 - 0
base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/auth/feign/SignatureInterceptor.java

@@ -0,0 +1,43 @@
+package com.usoftchina.sso.auth.feign;
+
+import com.usoftchina.saas.utils.http.HmacUtils;
+import feign.RequestInterceptor;
+import feign.RequestTemplate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Collection;
+import java.util.Map;
+
+import static com.usoftchina.sso.auth.feign.SignatureConstant.*;
+
+/**
+ * @author yingp
+ * @date 2018/11/23
+ */
+public class SignatureInterceptor implements RequestInterceptor{
+
+    private Logger logger = LoggerFactory.getLogger(SignatureInterceptor.class);
+
+    private final String baseUrl;
+
+    public SignatureInterceptor(String baseUrl) {
+        this.baseUrl = baseUrl;
+    }
+
+    @Override
+    public void apply(RequestTemplate requestTemplate) {
+        Map<String, Collection<String>> headers = requestTemplate.headers();
+        if (headers.containsKey(WITH_TIMESTAMP_HEADER)) {
+            requestTemplate.query(headers.get(WITH_TIMESTAMP_HEADER).iterator().next(),
+                    String.valueOf(System.currentTimeMillis()));
+        }
+        if (headers.containsKey(WITH_SIGNATURE_HEADER)) {
+            String url = baseUrl + requestTemplate.url() + requestTemplate.queryLine();
+            requestTemplate.query(headers.get(WITH_SIGNATURE_HEADER).iterator().next(),
+                    HmacUtils.encode(url));
+            logger.debug("origin url: {}\nsigned url: {}", url,
+                    baseUrl + requestTemplate.url() + requestTemplate.queryLine());
+        }
+    }
+}

+ 28 - 0
base-servers/auth/sso-api/src/main/java/com/usoftchina/sso/config/SsoFeignConfig.java

@@ -0,0 +1,28 @@
+package com.usoftchina.sso.config;
+
+import com.usoftchina.sso.auth.feign.SignatureContract;
+import com.usoftchina.sso.auth.feign.SignatureInterceptor;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author yingp
+ * @date 2018/11/23
+ */
+@Configuration
+public class SsoFeignConfig {
+
+    @Value("${sso.base-url}")
+    private String baseUrl;
+
+    @Bean
+    public SignatureContract signatureContract() {
+        return new SignatureContract();
+    }
+
+    @Bean
+    public SignatureInterceptor signatureInterceptor() {
+        return new SignatureInterceptor(baseUrl);
+    }
+}

+ 2 - 2
base-servers/auth/sso-api/src/test/resources/application.yml

@@ -1,3 +1,3 @@
 sso:
-  base-url: http://192.168.253.12:32323
-#  base-url: https://sso.ubtob.com
+#  base-url: http://192.168.253.12:32323
+  base-url: https://sso.ubtob.com

+ 1 - 0
frontend/saas-portal-web/config/dev.env.js

@@ -8,6 +8,7 @@ module.exports = merge(prodEnv, {
     // 前端地址
     web: '"http://192.168.0.181"',
     // 后端接口网关
+    // api: '"http://192.168.253.31:8560"',
     api: '"http://192.168.0.181:8560"',
     // 账户中心接口
     sso: '"http://192.168.253.12:32323"'

+ 1 - 1
frontend/saas-portal-web/src/App.vue

@@ -13,7 +13,7 @@ export default {
   components: {
       // Headers,
       footers
-  }
+  },
 }
 </script>
 

+ 14 - 7
frontend/saas-portal-web/src/components/conenter/addgongsi.vue

@@ -20,9 +20,9 @@
                         <li>
                             <span class="qy-biaoti">所属行业</span>
                             <select ref="qyindustry" style="width:71%" name="selectAge" id="selectAge">   
-                                <option value="飞飞公司">飞飞公司</option>   
-                                <option value="飞飞公司">飞飞公司</option>   
-                                <option value="飞飞公司">飞飞公司</option>   
+                                <option value="贸易类">贸易类</option>   
+                                <option value="制造类">制造类</option>   
+                                <option value="其他">其他</option>   
                             </select>
                         </li>
                         <li style="height:60px;">
@@ -93,11 +93,18 @@ import VDistpicker from 'v-distpicker'
                     this.$refs.qyno.innerHTML = '企业名不能为空';
                 } else {
                     this.$refs.qyno.innerHTML = '';
-                    this.$ajax.get("http://192.168.253.12:32323/"+`?spaceName=${qyname}`)
+                    let token = this.mytoken.token;
+                    this.$ajax({
+                        url: this.$url.api+"/api/account/accountCenter/checkSpaceName"+`?spaceName=${qyname}`,
+                        method :'get',
+                        headers: {
+                            "Authorization":token
+                        }
+                    })
                     .then(res=>{
-                        console.log(res);
-                        this.qymingzi = on;
-                        console.log(this.qymingzi)
+                        // console.log(res);
+                        // this.qymingzi = on;
+                        // console.log(this.qymingzi)
                     })
                     .catch(err=>{
                         console.log(err);

+ 55 - 28
frontend/saas-portal-web/src/components/conenter/company.vue

@@ -2,11 +2,11 @@
   <div>
     <iframe hidden :src="setTokenPage"></iframe>
     <!-- 遮罩 -->
-    <div class="zhezhao"></div>
+    <div class="zhezhao" v-if="issetDefault || isOpensaas"></div>
     <!-- 设置默认弹窗 -->
-    <div class="tanchuang szmoren">
+    <div class="tanchuang szmoren" v-if="issetDefault">
       <div class="over"><img @click="guanbitc" class="right xs" src="/static/img/qiye/chahao.png" alt=""></div>
-      <div v-if="moren">
+      <div v-if="isDefault">
         <div class="tc-text tc-queren"><span>是否确认设为默认企业?</span></div>
         <div class="tc-anniu">
           <button @click="setDefault">确认</button>
@@ -19,7 +19,7 @@
       </div>
     </div>
     <!-- 开通sass服务弹窗 -->
-    <div class="tanchuang ktsass">
+    <div class="tanchuang ktsass" v-if="isOpensaas">
       <div class="over"><img @click="guanbitc" class="right xs" src="/static/img/qiye/chahao.png" alt=""></div>
       <div v-if="ktsass">
         <div class="tc-text tc-queren"><span>是否确认开通saas服务?</span></div>
@@ -46,7 +46,7 @@
       </div>
     </div>
     <!-- 开通10个不能继续开通 -->
-    <div class="tanchuang nokaitong" style="display:none">
+    <div class="tanchuang nokaitong" style="display:none" v-if="isNoopen">
       <div class="over"><img @click="guanbitc" class="right xs" src="/static/img/qiye/chahao.png" alt=""></div>
       <div>
         <div class="tc-conent"><img src="/static/img/qiye/buneng kaitong@1x.png" alt=""></div>
@@ -57,7 +57,7 @@
       </div>
     </div>
 
-        <div class="gs-qiyebox">
+        <div class="gs-qiyebox" ref="qiyebox">
             <!-- 点击查看企业详情 -->
             <div v-for="(d , i) in arr " :key="i" class="gs-xiangqing xs">
                 <div class="left gs-xqleft" @click= "getEnterpriseInfo(d)">
@@ -93,10 +93,14 @@
     export default {
         data(){
             return {
+                issetDefault: false,//设置默认
+                isOpensaas: false,//开通saas弹窗
+                isNoopen: false,//开通10个不能继续开通
                 index:0,
-                ktsass: true,//开通sass
-                moren: true,//开通默认
+                ktsass: true,//确认开通saas
+                isDefault: true,//开通默认
                 comdata: this.$store.state.data,//登录成功后的本地数据
+                isAutoLogin: this.$store.state.isAutoLogin,
                 mytoken: JSON.parse(localStorage.getItem('app-state-session')),//本地储存的用户信息
                 arr: []//企业列表信息
             }
@@ -106,15 +110,19 @@
                 return this.$url.web + '/set-token.html'
             }
         },
+        watch:{
+            arr:function(){
+                this.$nextTick(function(){
+                    this.boxheight();
+                })
+            }
+        },
         mounted(){
-            this.boxheight();
-            // console.log("我是子路由的"+this.comdata)
             let mytoken = JSON.parse(localStorage.getItem('app-state-session'));
             let token = String(mytoken.token);
             // console.log(mytoken.account)
-            console.log(this.$url.api)
             this.$ajax({
-                    url: "/api/account/accountCenter/company/list",
+                    url: this.$url.api+"/api/account/accountCenter/company/list",
                     method: 'get',
                     params: {
                         mobile: mytoken.account.mobile
@@ -125,26 +133,36 @@
                     }
                 })
                 .then(res=>{
-                    this.arr = res.data.data
+                    this.arr = res.data.data.spaces;
+                    let hasCompany = res.data.data.hasDefaultCompany;
+                    let companyId = res.data.data.defaultCompanyId;
+                    if (this.isAutoLogin) {
+                        if (hasCompany) {
+                            this.selectServe(companyId)
+                        }
+                        this.isAutoLogin = false
+                    }
                     // console.log(res.data.data)
                 })
                 .catch(err=>{
                     console.log("请求失败",err)
                 })
+            
         },
         methods: {
             //设置默认弹窗
             showDefaultWin(i){
                 this.index = i;
-                $(".szmoren").css("display","block");
-                $(".zhezhao").css("display","block");
+                this.issetDefault = true;
+                // $(".szmoren").css("display","block");
+                // $(".zhezhao").css("display","block");
             },
             //确认默认
             setDefault(){
                 let i = this.index;
                 let token = this.mytoken.token;
                 this.$ajax({
-                    url: '/api/account/accountCenter/bind/defaultCompany',
+                    url: this.$url.api+'/api/account/accountCenter/bind/defaultCompany',
                     method: 'post',
                     data:{
                         companyId: this.arr[i].id,
@@ -157,7 +175,7 @@
                 })
                 .then(res=>{
                     // console.log('请求成功',res);
-                    this.moren = false;
+                    this.isDefault = false;
                 })
                 .catch(err=>{
                     console.log('请求失败',err);
@@ -169,7 +187,7 @@
                 let token = this.mytoken.token;
                 const frame = window.frames[window.frames.length - 1];
                 this.$ajax({
-                    url: '/api/auth/switch/company?companyId='+id,//http://192.168.253.31:8560
+                    url: this.$url.api+'/api/auth/switch/company?companyId='+id,//http://192.168.253.31:8560
                     method :'get',
                     headers: {
                         "Authorization":token
@@ -182,7 +200,7 @@
                     session.span = session.timestamp - new Date().getTime();
                     session.token=mytoken;
                     frame.postMessage(JSON.stringify(session), '*');
-                    window.location.href = me.$url.web
+                    window.location.href = this.$url.web
                 })
                 .catch(err=>{
                     console.log('请求失败',err)
@@ -191,8 +209,9 @@
             },
             //开通sass
             showOpenServeWin(){
-                $(".ktsass").css('display','block');
-                $(".zhezhao").css("display","block");
+                this.isOpensaas = true;
+                // $(".ktsass").css('display','block');
+                // $(".zhezhao").css("display","block");
                 this.ktsass = true;
             },
             confirmSaas(){//确认sass
@@ -200,8 +219,9 @@
             },
             //进入服务
             showServeWin(){
-                $(".ktsass").css('display','none');
-                $(".zhezhao").css("display","none");
+                this.isOpensaas = false
+                // $(".ktsass").css('display','none');
+                // $(".zhezhao").css("display","none");
             },
             //查看企业详情
             getEnterpriseInfo(d){
@@ -214,13 +234,17 @@
             },
             //关闭弹窗
             guanbitc(){
-                $(".tanchuang").css("display","none");
-                $(".zhezhao").css("display","none");
+                this.issetDefault = false;
+                this.isOpensaas = false
+                // $(".tanchuang").css("display","none");
+                // $(".zhezhao").css("display","none");
             },
             //没有内容也要有一定的高度
             boxheight(){
-                let H = $(".gs-qiyebox").height();
-                if (H <= 500) {
+                let H = this.$refs.qiyebox.offsetHeight;
+                // let H = $(".gs-qiyebox").height();
+                console.log(H)
+                if (H < 300) {
                     $(".gs-qiyebox").css("height",'500px')
                 } else {
                     $(".gs-qiyebox").css("height",'')
@@ -232,6 +256,9 @@
 
 <style scoped>
 .zhezhao {
-    display: none;
+    /* display: none */
+}
+.tanchuang {
+    /* display: none */
 }
 </style>

+ 23 - 8
frontend/saas-portal-web/src/components/conenter/enterprise.vue

@@ -1,6 +1,7 @@
 <template>
     <div class="div">
-        <div id="navigation1" class="navbar-inverse navbar-fixed-top animated-header">
+        <iframe hidden :src="setTokenPage"></iframe>
+        <div id="navigation" class="navbar-inverse navbar-fixed-top animated-header">
         <div class="container">
             <div class="navbar-header">
                 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
@@ -17,11 +18,14 @@
             </div>
             <div class="collapse navbar-collapse navbar-right" role="navigation">
                 <ul id="nav" class="nav navbar-nav menu">
-                    <li><router-link to="/home"><a href="#"><span>首页</span></a></router-link></li>
+                    <li><router-link to="/home"><a href="#"><span style="color: white">首页</span></a></router-link></li>
                     <li><a href="https://uas.usoftchina.com/about" target="_blank"><span>关于我们</span></a></li>
                     <li>
-                        <a href="#"><span class="">{{mytoken.realname}}</span></a>
-                        <a href=""><span class="">退出</span></a>
+                        <span style="color:#fff;font-size: 13px;">
+                            <img style="width: 25px;" src="/static/img/assets/denglu3x.png" alt="">
+                            {{mytoken.realname}}
+                        </span>
+                        <a href=""><span @click="loginout" class="">【退出】</span></a>
                     </li>
                 </ul>
             </div>
@@ -100,6 +104,7 @@
 </template>
 
 <script>
+import Session from '@/utils/session'
     export default {
         data(){
             return{
@@ -110,12 +115,11 @@
                 tab: [
                     {name: '企业信息'},
                     {name: '个人信息'},
-                    {name: '安全信息'},
+                    // {name: '安全信息'},
                     ],
             }
         },
         mounted(){
-            // console.log("我是父路由的"+this.mydata);
             // console.log(this.mydata)
         },
         components: {
@@ -125,11 +129,22 @@
             // tab切换
             qiehuan(index){
                 this.nowindex = index;
-            }, 
+            },
+            //退出
+            loginout(){
+                const frame = window.frames[window.frames.length - 1]
+                frame.postMessage('', '*')
+                Session.remove();
+                this.$router.push({name:'name',});
+            } 
         },
     }
 </script>
 
 <style scoped>
-    /* @import '../../../static/css/gongsi'; */
+.navbar-inverse {
+    /* background-color: rgba(0, 0, 0, 0.77);
+    height: 70px;
+    line-height: 70px; */
+}
 </style>

+ 26 - 8
frontend/saas-portal-web/src/components/conenter/home.vue

@@ -1,6 +1,6 @@
 <template>
     <div>
-		<div id="navigation" class="navbar-inverse navbar-fixed-top animated-header" style="padding: 3px;">
+		<div id="navigation" class="navbar-inverse navbar-fixed-top animated-header">
         <div class="container">
             <div class="navbar-header">
                 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
@@ -19,13 +19,13 @@
           <ul id="nav" class="nav navbar-nav menu">
             <li><a href="#"><span>首页</span></a></li>
             <li @click="home">
-              <a href="#"><span>特色</span></a>
+              <a href="#feature"><span>特色</span></a>
               <!-- <router-link to="/enterprise"><a href="#"><span>特色</span></a></router-link> -->
             </li>
             <li><a href="#service"><span>功能</span></a></li>
             <li><a href="#prototype"><span>帮助中心</span></a></li>
-            <li><a href="#prototype"><span>联系我们</span></a></li>
-            <li class="login" v-if="!account">
+            <li><a href="https://uas.usoftchina.com/about" target="_blank"><span>关于我们</span></a></li>
+            <li class="login" v-if="!account" style="margin-left: 20px;">
               <span @click="login"><img src="/static/img/assets/denglu3x.png" alt="">登录  &nbsp;</span>
               <span @click="register"><img src="/static/img/assets/zhuce3x.png" alt="">注册</span>
             </li>
@@ -34,9 +34,8 @@
 								<img src="/static/img/assets/denglu3x.png" alt="">
 								<span id="user-info">{{account.realname || account.username}}</span>
 							</span>
-              <span>退出</span>    |
-              <router-link to="/enterprise"><a href="#"><span>账户管理</span></a></router-link>
-              <!-- <a href="#">账户管理</a> -->
+              <span @click="loginout">【退出】</span>    |
+              <router-link to="/enterprise"><a href="#"><span style="color: white">账户管理</span></a></router-link>
             </li>
           </ul>
         </div>
@@ -44,7 +43,7 @@
         
     </div>
 
-
+    <iframe hidden :src="setTokenPage"></iframe>
     <main class="site-content" role="main">
       <!-- 遮罩 -->
       <div class="zhezhao" v-if="isLogin || isRegister || isexperience"></div>
@@ -57,6 +56,10 @@
         <iframe hidden :src="setTokenPage"></iframe>
       </div>
       <div class="tiyan" v-if="isexperience">
+        <div><span>欢迎你访问u企云服</span></div>
+        <div>
+          <p>1.</p>
+        </div>
         我是体验
         <img @click="Closeexperience" class="tc-on shut"
                src="/static/img/qiye/chahao.png" alt="">
@@ -332,6 +335,7 @@
       this.clientId = Math.random().toString(36).substr(2)
       // 从本地加载已经登录的信息
       this.account = Session.getAccount()
+      console.log(this.$store.state.isAutoLogin)
     },
     computed: {
       setTokenPage() {
@@ -366,6 +370,7 @@
             if (!account.companyId) {
               // 添加企业
               me.$router.push({path: '/enterprise', query: {mydata: account}})
+              me.$store.state.isAutoLogin = true;
             } else {
               // 跳转应用页面
               window.location.href = me.$url.web
@@ -385,6 +390,13 @@
         this.isRegister = true
         this.listenOnCallback()
       },
+      //退出
+      loginout(){
+        const frame = window.frames[window.frames.length - 1]
+        frame.postMessage('', '*')
+        Session.remove()
+        this.$router.go(0); 
+      },
       // 关闭窗口
       closeModal() {
         const me = this
@@ -423,4 +435,10 @@
   z-index: 10001;
   background: white;
 }
+.navbar-inverse {
+  /* padding: 3px; */
+  padding: 0px;
+  /* height: 70px;
+  line-height: 70px; */
+}
 </style>

+ 0 - 1
frontend/saas-portal-web/src/main.js

@@ -12,7 +12,6 @@ Vue.config.productionTip = false
 
 // 注入url配置
 Vue.prototype.$url = process.env.BASE_URL
-Axios.defaults.baseURL = 'http://192.168.253.31:8560'
 /* eslint-disable no-new */
 new Vue({
   el: '#app',

+ 1 - 1
frontend/saas-portal-web/src/router/index.js

@@ -16,7 +16,7 @@ export default new Router({
       component: Home
     },
     {
-      path: '/',
+      path: '*',
       redirect:'/home'
     },
     {

+ 1 - 0
frontend/saas-portal-web/src/store/index.js

@@ -5,6 +5,7 @@ Vue.use(Vuex)
 export default new Vuex.Store({
     state:{
         data: [],
+        isAutoLogin: ''
     },
     mutations:{
          setId(state ,  id) {

+ 0 - 1
frontend/saas-portal-web/static/css/gongsi.css

@@ -24,7 +24,6 @@
 }
 /* 弹窗 -----------------------------------------------*/
 .tanchuang {
-    display: none;
     background-image: url('../img/qiye/tanchuang.png');
     width: 340px;
     height: 214px;

+ 1 - 1
frontend/saas-portal-web/static/css/main.css

@@ -287,7 +287,7 @@ main > section {
 }
 .login > span:hover,.profile > span:hover{
     cursor:pointer;
-    color: #0aa6bd;
+    /* color: #0aa6bd; */
 }
 .my-label {
     float: left;

+ 4 - 4
frontend/saas-portal-web/static/js/mains.js

@@ -123,7 +123,7 @@ $(document).ready(function(){
             $("#navigation").removeClass("animated-header");
         } else {
             $(".navbar-brand a").css("color","inherit");
-            // $("#navigation").addClass("animated-header");
+            $("#navigation").addClass("animated-header");
         }
     });
 
@@ -136,9 +136,9 @@ $(document).ready(function(){
 
     $('#home-slider, #slider, .sl-slider, .sl-content-wrapper').css('height',slideHeight);
 
-    // $(window).resize(function(){'use strict',
-    //     $('#home-slider, #slider, .sl-slider, .sl-content-wrapper').css('height',slideHeight);
-    // });
+    $(window).resize(function(){'use strict',
+        $('#home-slider, #slider, .sl-slider, .sl-content-wrapper').css('height',slideHeight);
+    });
 	
 	
 	

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

@@ -285,7 +285,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             text: "本次核销金额",
             xtype: 'numbercolumn',
             dataIndex: "pbd_nowbalance",
-            width: 120,
+            width: 140,
             editor : {
                 xtype : "numberfield",
                 decimalPrecision: 2

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

@@ -32,6 +32,7 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         xtype: 'bandinfoDbfindTrigger',
         name: 'pd_bankname',
         fieldLabel: '资金账户',
+        showDetail: true
     },{
         xtype: 'condatefield',
         name: 'pb_date',
@@ -69,15 +70,47 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
         codeField: 'pb_code',
         addTitle: '付款单',
         addXtype: 'money-paybalance-formpanel',
-        defaultCondition:'',
+        defaultCondition: '',
         baseVastUrl: '/api/money/paybalance/',
         baseColumn: [
-        {
+            {
+                text: 'id',
+                dataIndex: 'id',
+                width: 0,
+                xtype: 'numbercolumn',
+                hidden: true
+            }, {
+                text: '付款单号',
+                dataIndex: 'pb_code',
+                width: 150
+            }, {
+                text: '日期',
+                dataIndex: 'pb_date',
+                xtype: 'datecolumn',
+                width: 110
+            }, {
+                text: '供应商名称',
+                dataIndex: 'pb_vendname',
+                width: 250,
+            }, {
+                text: '单据状态',
+                dataIndex: 'pb_status',
+                width: 90
+            }, {
+                text: '付款人',
+                dataIndex: 'pb_manname',
+                width: 110
+            }, {
+                text: '备注',
+                dataIndex: 'pb_remark',
+                width: 250
+            }],
+        relativeColumn: [{
             text: 'id',
             dataIndex: 'id',
             width: 0,
             xtype: 'numbercolumn',
-            hidden:true
+            hidden: true
         }, {
             text: '付款单号',
             dataIndex: 'pb_code',
@@ -91,35 +124,41 @@ Ext.define('saas.view.money.paybalance.QueryPanel', {
             text: '供应商名称',
             dataIndex: 'pb_vendname',
             width: 250,
+        }, {
+            text: '单据状态',
+            dataIndex: 'pb_status',
+            width: 90
+        }, {
+            text: '付款人',
+            dataIndex: 'pb_manname',
+            width: 110
+        },{
+            text: '资金账户',
+            dataIndex: 'pd_bankname',
+            width: 110
         },{
             text: '付款金额',
             xtype: 'numbercolumn',
             dataIndex: 'pd_amount',
             width: 120,
-            renderer : function(v) {
+            renderer: function (v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
                 var format = '0,000.' + xr.join();
                 return Ext.util.Format.number(v, format);
             },
-        }, {
-            text: '单据状态',
-            dataIndex: 'pb_status',
-            width: 90
-        }, {
-            text: '付款人',
-            dataIndex: 'pb_manname',
-            width: 110
-        }, {
+        } ,{
+            text: '结算方式',
+            dataIndex: 'pd_paymethod',
+            width: 250
+        },{
+            text: '结算号',
+            dataIndex: 'pd_paycode',
+            width: 250
+        },{
             text: '备注',
-            dataIndex: 'pb_remark',
+            dataIndex: 'pd_remark',
             width: 250
-        }],
-        relativeColumn: []
-    },
-
-    // override
-    getQueryMode: function() {
-        return 'MAIN';
+        }]
     }
 });

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

@@ -288,7 +288,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
             text: "本次核销金额",
             xtype: 'numbercolumn',
             dataIndex: "rbd_nowbalance",
-            width:120,
+            width:140,
             editor : {
                 xtype : "numberfield",
                 decimalPrecision: 2

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

@@ -24,6 +24,7 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
         xtype: 'bandinfoDbfindTrigger',
         name: 'rd_bankname',
         fieldLabel: '资金账户',
+        showDetail: true
     },{
         xtype: 'condatefield',
         name: 'rb_date',
@@ -82,6 +83,50 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
             text: '客户名称',
             dataIndex: 'rb_custname',
             width: 250,
+        }, {
+            text: '单据状态',
+            dataIndex: 'rb_status',
+            width: 90
+        }, {
+            text: '收款人',
+            dataIndex: 'rb_manname',
+            width: 110
+        }, {
+            text: '备注',
+            dataIndex: 'rb_remark',
+            width: 250
+        }],
+        relativeColumn:[{
+            text: 'id',
+            dataIndex: 'id',
+            width: 100,
+            xtype: 'numbercolumn',
+            hidden: true
+        }, {
+            text: '收款单号',
+            dataIndex: 'rb_code',
+            width: 150
+        }, {
+            text: '日期',
+            dataIndex: 'rb_date',
+            xtype: 'datecolumn',
+            width: 110
+        }, {
+            text: '单据状态',
+            dataIndex: 'rb_status',
+            width: 90
+        }, {
+            text: '客户名称',
+            dataIndex: 'rb_custname',
+            width: 250,
+        },{
+            text: '收款人',
+            dataIndex: 'rb_manname',
+            width: 110
+        },{
+            text: '资金账户',
+            dataIndex: 'rd_bankname',
+            width: 110
         },{
             text: '收款金额',
             xtype: 'numbercolumn',
@@ -94,21 +139,17 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
                 return Ext.util.Format.number(v, format);
             }
         }, {
-            text: '单据状态',
-            dataIndex: 'rb_status',
+            text: '结算方式',
+            dataIndex: 'rd_paymethod',
             width: 90
         }, {
-            text: '收款人',
-            dataIndex: 'rb_manname',
-            width: 110
-        }, {
+            text: '结算号',
+            dataIndex: 'rd_paycode',
+            width: 90
+        },{
             text: '备注',
             dataIndex: 'rb_remark',
             width: 250
         }]
-    },
-    // override
-    getQueryMode: function() {
-        return 'MAIN';
     }
 });

+ 27 - 27
frontend/saas-web/app/view/money/report/CustomerCheck.js

@@ -7,7 +7,7 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
 
     viewName: 'money-report-customercheck',
 
-    groupField: 'pi_custname',
+    // groupField: 'pi_custname',
     listUrl: '/api/money/report/customercheck',
     defaultCondition: null,
     reportTitle: '客户对账单',
@@ -88,19 +88,19 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
             width: 110,
             dataIndex: 'pd_total',
             xtype: 'numbercolumn',
-            renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 2 ? 2 : 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 > 2 ? 2 : arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join();
-                return Ext.util.Format.number(v, format);
-            }
+            // renderer : function(v) {
+            //     var arr = (v + '.').split('.');
+            //     var xr = (new Array(arr[1].length > 2 ? 2 : 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 > 2 ? 2 : arr[1].length)).fill('0');
+            //     var format = '0,000.' + xr.join();
+            //     return Ext.util.Format.number(v, format);
+            // }
         }, {
             text: '不含税单价',
             width: 110,
@@ -112,19 +112,19 @@ Ext.define('saas.view.money.report.CustomerCheckCheck', {
             xtype: 'numbercolumn',
             dataIndex: 'pd_nettotal',
             xtype: 'numbercolumn',
-            renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 2 ? 2 : 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 > 2 ? 2 : arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join();
-                return Ext.util.Format.number(v, format);
-            }
+            // renderer : function(v) {
+            //     var arr = (v + '.').split('.');
+            //     var xr = (new Array(arr[1].length > 2 ? 2 : 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 > 2 ? 2 : arr[1].length)).fill('0');
+            //     var format = '0,000.' + xr.join();
+            //     return Ext.util.Format.number(v, format);
+            // }
         }, {
             text: '备注',
             dataIndex: 'pd_remark',

+ 26 - 26
frontend/saas-web/app/view/money/report/VendorCheck.js

@@ -79,19 +79,19 @@ Ext.define('saas.view.money.report.VendorCheck', {
             dataIndex: 'qty',
             xtype: 'numbercolumn',
             width: 110,
-            renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-	            var format = '0.' + xr.join();
-                return Ext.util.Format.number(v, format);
-            },
-            summaryType: 'sum',
-            summaryRenderer: function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
-	            var format = '0.' + xr.join();
-                return Ext.util.Format.number(v, format);
-            }
+            // renderer : function(v) {
+            //     var arr = (v + '.').split('.');
+            //     var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
+	         //    var format = '0.' + xr.join();
+            //     return Ext.util.Format.number(v, format);
+            // },
+            // summaryType: 'sum',
+            // summaryRenderer: function(v) {
+            //     var arr = (v + '.').split('.');
+            //     var xr = (new Array(arr[1].length > 3 ? 3 : arr[1].length)).fill('0');
+	         //    var format = '0.' + xr.join();
+            //     return Ext.util.Format.number(v, format);
+            // }
         }, {
             text: '单价',
             dataIndex: 'pd_orderprice',
@@ -108,19 +108,19 @@ Ext.define('saas.view.money.report.VendorCheck', {
             dataIndex: 'pd_total',
             xtype: 'numbercolumn',
             width: 110,
-            renderer : function(v) {
-                var arr = (v + '.').split('.');
-                var xr = (new Array(arr[1].length > 2 ? 2 : 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 > 2 ? 2 : arr[1].length)).fill('0');
-                var format = '0,000.' + xr.join();
-                return Ext.util.Format.number(v, format);
-            }
+            // renderer : function(v) {
+            //     var arr = (v + '.').split('.');
+            //     var xr = (new Array(arr[1].length > 2 ? 2 : 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 > 2 ? 2 : arr[1].length)).fill('0');
+            //     var format = '0,000.' + xr.join();
+            //     return Ext.util.Format.number(v, format);
+            // }
         }, {
             text: '不含税单价',
             dataIndex: 'pd_netprice',

+ 34 - 1
frontend/saas-web/app/view/money/verification/FormPanel.js

@@ -281,11 +281,12 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 text: "本次核销金额",
                 dataIndex: "vcd_nowbalance",
                 xtype: 'numbercolumn',
+                width: 150,
+                allowBlank : false,
                 editor : {
                     xtype : "numberfield",
                     decimalPrecision: 2
                 },
-                width: 110,
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
                     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
@@ -369,6 +370,14 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 defaultValue: new Date(),
                 allowBlank : false,
                 name: 'vc_date'
+            }, {
+                xtype: 'hidden',
+                name: 'vc_amount1',
+                fieldLabel: '核销金额'
+            }, {
+                xtype: "hidden",
+                name: "vc_amount2",
+                fieldLabel: "未核销金额"
             }],
             details: ['detail1', 'detail2']
         },
@@ -414,6 +423,14 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 defaultValue: new Date(),
                 allowBlank : false,
                 name: 'vc_date'
+            }, {
+                xtype: 'hidden',
+                name: 'vc_amount1',
+                fieldLabel: '核销金额'
+            }, {
+                xtype: "hidden",
+                name: "vc_amount2",
+                fieldLabel: "未核销金额"
             }],
             details: ['detail1', 'detail2']
         },
@@ -457,6 +474,14 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 defaultValue: new Date(),
                 allowBlank : false,
                 name: 'vc_date'
+            }, {
+                xtype: 'hidden',
+                name: 'vc_amount1',
+                fieldLabel: '核销金额'
+            }, {
+                xtype: "hidden",
+                name: "vc_amount2",
+                fieldLabel: "未核销金额"
             }],
             details: ['detail1']
         },
@@ -500,6 +525,14 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 defaultValue: new Date(),
                 allowBlank : false,
                 name: 'vc_date'
+            }, {
+                xtype: 'hidden',
+                name: 'vc_amount1',
+                fieldLabel: '核销金额'
+            }, {
+                xtype: "hidden",
+                name: "vc_amount2",
+                fieldLabel: "未核销金额"
             }],
             details: ['detail1']
         },

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

@@ -150,7 +150,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
             text: '明细序号',
             dataIndex: 'pd_detno',
             xtype: 'numbercolumn',
-            width: 80
+            width: 100
         }, {
             text: '关联销售单号',
             dataIndex: 'pd_ordercode',
@@ -159,7 +159,11 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
             text: '订单序号',
             dataIndex: 'pd_orderdetno',
             xtype:'numbercolumn',
-            width: 80
+            width: 100,
+            renderer : function(v) {
+                var format = '0'
+                return Ext.util.Format.number(v, format);
+            }
         }, {
             text: '物料编号',
             dataIndex: 'pd_prodcode',

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

@@ -151,7 +151,7 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
             text: '明细序号',
             dataIndex: 'pd_detno',
             xtype: 'numbercolumn',
-            width: 80
+            width: 100
         }, {
             text: '关联销售单号',
             dataIndex: 'pd_ordercode',
@@ -160,7 +160,11 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
             text: '订单序号',
             dataIndex: 'pd_orderdetno',
             xtype:'numbercolumn',
-            width: 80
+            width: 100,
+            renderer : function(v) {
+                var format = '0'
+                return Ext.util.Format.number(v, format);
+            }
         }, {
             text: '物料编号',
             dataIndex: 'pd_prodcode',

+ 81 - 49
frontend/saas-web/app/view/stock/inventory/EditDataList.js

@@ -14,7 +14,8 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
     requires: [
         'Ext.Action',
         'Ext.grid.plugin.CellEditing',
-        'Ext.selection.CellModel'
+        'Ext.selection.CellModel',
+        'Ext.grid.plugin.Exporter'
     ],
     plugins: {
         cellediting: {
@@ -24,7 +25,8 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
                 //     context.column.fireEvent('edit', context.value);
                 // }
             }
-        }
+        },
+        gridexporter: true
     },
     tbar: [{
         xtype: 'hidden',
@@ -53,25 +55,9 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         storeUrl:'/api/document/producttype/getCombo',
         name : "pr_kind",
         bind:'{pr_kind}', 
-        emptyText : "类型", 
-        allowBlank : false, 
-        addHandler:function(b){
-            var document = Ext.create('saas.view.document.kind.Kind',{});
-            var form = this.ownerCmp.ownerCt;
-            this.dialog = form.getController().getView().add({
-                xtype: 'document-kind-childwin',
-                bind: {
-                    title: '新增物料类型'
-                },
-                dataKind:'productkind',
-                belong:document.etc['productkind'],
-                _parent:form,
-                _combo:this.ownerCmp,
-                record:null,
-                session: true
-            });
-            this.dialog.show();
-        },
+        emptyText : "类型",
+        hiddenBtn:true, 
+        allowBlank : false,
         width:150
     },{
         xtype: 'hidden',
@@ -118,7 +104,8 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         text:'导出',
         listeners: {
             click:function(b){
-             
+                var me = this.ownerCt.ownerCt;
+                me.onExport(me)
             }
         }
     },{
@@ -148,31 +135,31 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
     {
         text : "物料编号", 
         dataIndex : "st_prodcode", 
-        width : 120.0, 
+        width : 150.0, 
         xtype : "", 
     }, 
     {
         text : "物料名称", 
         dataIndex : "st_proddetail", 
-        width : 120.0, 
+        width : 200.0, 
         xtype : "", 
     },
     {
         text : "规格型号", 
         dataIndex : "st_prodorispeccode", 
-        width : 120.0, 
+        width : 150.0, 
         xtype : "", 
     },
     {
         text : "物料类别", 
         dataIndex : "st_prodkind", 
-        width : 120.0, 
+        width : 150.0, 
         xtype : "", 
     },
     {
         text : "单位", 
         dataIndex : "st_produnit", 
-        width : 120.0, 
+        width : 150.0, 
         xtype : "", 
     },
     {
@@ -184,19 +171,19 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
     {
         text : "仓库编号", 
         dataIndex : "st_whcode", 
-        width : 120.0, 
+        width : 150.0, 
         xtype : "", 
     },
     {
         text : "仓库", 
         dataIndex : "st_whname", 
-        width : 120.0, 
+        width : 200.0, 
         xtype : "", 
     },
     {
         text : "系统库存", 
         dataIndex : "st_batchqty", 
-        width : 120.0, 
+        width : 110.0, 
         xtype : "numbercolumn",
         renderer : function(v) {
             var arr = (v + '.').split('.');
@@ -208,7 +195,7 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
     {
         text : "盘点库存", 
         dataIndex : "st_actqty", 
-        width : 120.0, 
+        width : 110.0, 
         xtype : "numbercolumn",
         editor : {
             xtype : "numberfield",
@@ -235,7 +222,7 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
     {
         text : "盘盈盘亏", 
         dataIndex : "st_num", 
-        width : 120.0, 
+        width : 110.0, 
         xtype : "numbercolumn", 
     }],
 
@@ -281,9 +268,15 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
                         if (Ext.isEmpty(condition)) {
                             condition = "";
                         }
+                        // Ext.apply(store.proxy.extraParams, {
+                        //     number: op._page,
+                        //     size: store.pageSize,
+                        //     condition: JSON.stringify(condition)
+                        // });
                         Ext.apply(store.proxy.extraParams, {
-                            number: op._page,
-                            size: store.pageSize,
+                            number: store.exportNumber?store.exportNumber:op._page,
+                            size: store.exportPageSize?store.exportPageSize:store.pageSize,
+                            mode:'MAIN',
                             condition: JSON.stringify(condition)
                         });
                     }
@@ -415,19 +408,23 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         .then(function(localJson) {
             if(localJson.success){
                 // me.refresh();
-                var intValue = localJson.data.inData.id,
-                codeValue= localJson.data.inData.code,
-                name = localJson.data.inData.name;
-                saas.util.BaseUtil.openTab('stock-otherin-formpanel',name+"("+codeValue+")",codeValue+intValue, {
-                    initId: intValue
-                });
-        
-                intValue = localJson.data.outData.id;
-                codeValue= localJson.data.outData.code;
-                name = localJson.data.outData.name;
-                saas.util.BaseUtil.openTab('stock-otherout-formpanel',name+"("+codeValue+")",codeValue+intValue, {
-                    initId: intValue
-                });
+                if(localJson.data.inData){
+                    var intValue = localJson.data.inData.id,
+                    codeValue= localJson.data.inData.code,
+                    name = localJson.data.inData.name;
+                    saas.util.BaseUtil.openTab('stock-otherin-formpanel',name+"("+codeValue+")",codeValue+intValue, {
+                        initId: intValue
+                    });
+                }
+
+                if(localJson.data.outData){
+                    intValue = localJson.data.outData.id;
+                    codeValue= localJson.data.outData.code;
+                    name = localJson.data.outData.name;
+                    saas.util.BaseUtil.openTab('stock-otherout-formpanel',name+"("+codeValue+")",codeValue+intValue, {
+                        initId: intValue
+                    });
+                }
             }
         })
         .catch(function(res) {
@@ -515,6 +512,41 @@ Ext.define('saas.view.stock.inventory.EditDataList', {
         });
         return dirtyData;
     },
-
-
+    onImport:function(me){
+        console.log("导入");
+    },
+    onExport: function (me) {
+        // var grid = me.ownerCt.ownerCmp.ownerCt.ownerCt;
+        var grid = me;
+        //导出接口权限设置
+        var _url = grid.dataUrl.substring(0,grid.dataUrl.length-1);
+        var lastIndex = _url.lastIndexOf('/');
+        var caller = _url.substring(lastIndex);
+        var url = '/api/commons'+caller+'/export';
+        saas.util.BaseUtil.request({
+            url: url,
+            params: '',
+            method: 'GET',
+        })
+        .then(function(localJson) {
+            if(localJson.success){
+                grid.store.exportPageSize = 5000;
+                grid.store.exportNumber = 1;
+                grid.store.load(function(records, operation, success) {
+                    grid.saveDocumentAs({
+                        type: 'xlsx',
+                        title:  '盘点单列表',
+                        fileName: '盘点单列表.xlsx'
+                    });
+                    grid.store.exportPageSize = null;
+                    grid.store.exportNumber = null;
+                    grid.store.load(function(records, operation, success) {
+                    });
+                });
+            }
+        })
+        .catch(function(res) {
+            saas.util.BaseUtil.showErrorToast('导出失败: ' + res.message);
+        });
+    }
 });

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

@@ -95,7 +95,9 @@ Ext.define('saas.view.stock.make.FormPanelController', {
         form = me.getView(),
         viewModel = me.getViewModel(),
         store = viewModel.get('detail0').detailStore,
-        loadData = new Array();;
+        type = viewModel.get('ma_type'),
+        loadData = new Array();
+
         //请求bom资料
         saas.util.BaseUtil.request({
             url: form._getBomUrl+v,
@@ -117,7 +119,8 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         mm_remark:item.bd_remark,                        
                         mm_whid:item.productDTO.pr_whid,                        
                         mm_whcode:item.productDTO.pr_whcode,
-                        mm_whname:item.productDTO.pr_whname
+                        mm_whname:item.productDTO.pr_whname,
+                        mm_price:type=='拆件'?item.productDTO.pr_purcprice:null
                     })                
                 });
                 store.loadData(loadData);