Browse Source

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

zhuth 7 years ago
parent
commit
9004074bc8
22 changed files with 1098 additions and 373 deletions
  1. 28 8
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/FundtransferServiceImpl.java
  2. 56 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java
  3. 82 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java
  4. 1 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  5. 2 2
      applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml
  6. 0 4
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdIODetailMapper.java
  7. 0 4
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdInOutMapper.java
  8. 0 85
      applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml
  9. 1 60
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml
  10. 7 91
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml
  11. 18 7
      base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java
  12. 21 9
      frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js
  13. 3 1
      frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js
  14. 214 0
      frontend/saas-web/app/view/core/form/DataMultiCombo.js
  15. 28 0
      frontend/saas-web/app/view/document/kind/ChildForm.js
  16. 1 1
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  17. 7 8
      frontend/saas-web/app/view/sys/account/DataList.js
  18. 321 0
      frontend/saas-web/app/view/sys/baseconfig/FormPanel.js
  19. 66 0
      frontend/saas-web/app/view/sys/baseconfig/FormPanelController.js
  20. 5 0
      frontend/saas-web/app/view/sys/baseconfig/FormPanelModel.js
  21. 232 82
      frontend/saas-web/app/view/sys/config/FormPanel.js
  22. 5 0
      frontend/saas-web/app/view/sys/manager/FormPanel.js

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

@@ -104,14 +104,34 @@ public class FundtransferServiceImpl extends CommonBaseServiceImpl<FundtransferM
         Iterator isList = fundtransferdetailList.iterator();
         Iterator isList = fundtransferdetailList.iterator();
         while (isList.hasNext()){
         while (isList.hasNext()){
             Fundtransferdetail fundtransferdetail = (Fundtransferdetail) isList.next();
             Fundtransferdetail fundtransferdetail = (Fundtransferdetail) isList.next();
-            Double amount = banksubledgerMapper.selectThisamount(fundtransferdetail.getFtd_bankcode());
-            Double inamount = banksubledgerMapper.selectThisamount(fundtransferdetail.getFtd_inbankcode());
-
-            //中间表
-            banksubledgerMapper.updateBankcode(amount, fundtransferdetail.getFtd_nowbalance(),
-                    fundtransferdetail.getFtd_bankcode(), "-");
-            banksubledgerMapper.updateBankcode(inamount, fundtransferdetail.getFtd_nowbalance(),
-                    fundtransferdetail.getFtd_bankcode(), "+");
+            Double amount = fundtransferdetail.getFtd_nowbalance();
+            //收款
+            Banksubledger banksubledger = new Banksubledger();
+            banksubledger.setCompanyId(BaseContextHolder.getCompanyId());
+            banksubledger.setBl_ym(fundtransferdetail.getFtd_ym());
+            banksubledger.setBl_bankid(fundtransferdetail.getFtd_inbankid());
+            banksubledger.setBl_bankcode(fundtransferdetail.getFtd_inbankcode());
+            banksubledger.setBl_bankname(fundtransferdetail.getFtd_inbankname());
+            banksubledger.setBl_code(fundtransfer.getFt_code());
+            banksubledger.setBl_kind("资金转账");
+            banksubledger.setBl_date(fundtransfer.getFt_date());
+            banksubledger.setBl_income(fundtransferdetail.getFtd_nowbalance());
+            banksubledger.setBl_remark(fundtransferdetail.getFtd_remark());
+            banksubledgerMapper.insertSelective(banksubledger);
+
+            //付款
+            Banksubledger banksubledger1 = new Banksubledger();
+            banksubledger1.setCompanyId(BaseContextHolder.getCompanyId());
+            banksubledger1.setBl_ym(fundtransferdetail.getFtd_ym());
+            banksubledger1.setBl_bankid(fundtransferdetail.getFtd_bankid());
+            banksubledger1.setBl_bankcode(fundtransferdetail.getFtd_bankcode());
+            banksubledger1.setBl_bankname(fundtransferdetail.getFtd_bankname());
+            banksubledger1.setBl_code(fundtransfer.getFt_code());
+            banksubledger1.setBl_kind("资金转账");
+            banksubledger1.setBl_date(fundtransfer.getFt_date());
+            banksubledger1.setBl_spending(fundtransferdetail.getFtd_nowbalance());
+            banksubledger1.setBl_remark(fundtransferdetail.getFtd_remark());
+            banksubledgerMapper.insertSelective(banksubledger1);
 
 
             //资金账号表
             //资金账号表
             int bk_id = fundtransferdetail.getFtd_bankid();
             int bk_id = fundtransferdetail.getFtd_bankid();

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

@@ -14,10 +14,7 @@ import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.exception.BizException;
-import com.usoftchina.saas.money.mapper.BanksubledgerMapper;
-import com.usoftchina.saas.money.mapper.OthreceiptsMapper;
-import com.usoftchina.saas.money.mapper.OthreceiptsdetailMapper;
-import com.usoftchina.saas.money.mapper.StatsinfoMapper;
+import com.usoftchina.saas.money.mapper.*;
 import com.usoftchina.saas.money.po.*;
 import com.usoftchina.saas.money.po.*;
 import com.usoftchina.saas.money.service.OthreceiptsService;
 import com.usoftchina.saas.money.service.OthreceiptsService;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.page.PageRequest;
@@ -47,8 +44,14 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
     private StatsinfoMapper statsinfoMapper;
     private StatsinfoMapper statsinfoMapper;
     @Autowired
     @Autowired
     private MessageLogService messageLogService;
     private MessageLogService messageLogService;
-//    @Autowired
-//    private CommonService commonService;
+    @Autowired
+    private CommonService commonService;
+    @Autowired
+    private BankinformationMapper bankinformationMapper;
+    @Autowired
+    private RecbalanceMapper recbalanceMapper;
+    @Autowired
+    private SubledgerMapper subledgerMapper;
 
 
     @Override
     @Override
     public DocBaseDTO insert(Othte othte) {
     public DocBaseDTO insert(Othte othte) {
@@ -111,8 +114,55 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
             Othreceiptsdetail othreceiptsdetail = (Othreceiptsdetail) isList.next();
             Othreceiptsdetail othreceiptsdetail = (Othreceiptsdetail) isList.next();
             banksubledgerMapper.updateBankcode(amount, othreceiptsdetail.getOrd_nowbalance(),
             banksubledgerMapper.updateBankcode(amount, othreceiptsdetail.getOrd_nowbalance(),
                     othreceipts.getOr_bankcode(), "+");
                     othreceipts.getOr_bankcode(), "+");
+
         }
         }
 
 
+        //资金账号表
+        int bk_inid = othreceipts.getOr_bankid();
+
+        Double or_amount = othreceipts.getOr_amount();
+        //收款
+        Bankinformation bankinformation = bankinformationMapper.selectByPrimaryKey(bk_inid);
+        Double beginamount = 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);
+        bankinformation.setBk_income(incomme + or_amount);
+        bankinformation.setBk_spending(spending);
+        bankinformationMapper.updateByPrimaryKeySelective(bankinformation);
+
+        //客户付款
+        /**
+         * 更新客户资料
+         * cu_preamount=nvl(cu_preamount,0)+rb_preamount,
+         * cu_recamount=nvl(cu_recamount,0)-rb_rbdamount,
+         * cu_leftamount=cu_beginaramount-cu_beginprerecamount+cu_recamount-cu_preamount;
+         */
+        Customer customerData = recbalanceMapper.selectCustomerByPrimaryKey(othreceipts.getOr_custid());
+        Double preamount = customerData.getCu_preamount()==null?new Double(0):customerData.getCu_preamount();
+        Double beginapamount = customerData.getCu_beginaramount()==null?new Double(0):customerData.getCu_beginaramount();
+        Double beginprepayamount= customerData.getCu_beginprerecamount()==null?new Double(0):customerData.getCu_beginprerecamount();
+        Double recamount = customerData.getCu_recamount()==null?new Double(0):customerData.getCu_recamount();
+
+        Customer customer = new Customer();
+        customer.setId(Long.valueOf(othreceipts.getOr_custid()));
+        customer.setCu_preamount(preamount);
+        customer.setCu_recamount(recamount-or_amount);
+        customer.setCu_leftamount(beginapamount-beginprepayamount+recamount-or_amount-preamount);
+        recbalanceMapper.updateCustomerByPrimaryKeySelective(customer);
+
+        //插入subledger中间表
+        Subledger subledger = new Subledger();
+        subledger.setSl_code(othreceipts.getOr_code());
+        subledger.setSl_kind("其他收入单");
+        subledger.setSl_custid(othreceipts.getOr_custid());
+        subledger.setSl_vendid(0);
+        subledger.setSl_date(othreceipts.getOr_date());
+        subledger.setSl_amount(or_amount);
+        subledger.setCompanyId(BaseContextHolder.getCompanyId());
+        subledgerMapper.insertSelective(subledger);
+
+
         //计算期间金额
         //计算期间金额
         Statsinfo statsinfo = new Statsinfo();
         Statsinfo statsinfo = new Statsinfo();
         List<Integer> ymList = othreceiptsdetailMapper.selectYm(Math.toIntExact(id));
         List<Integer> ymList = othreceiptsdetailMapper.selectYm(Math.toIntExact(id));

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

@@ -13,10 +13,7 @@ import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.exception.BizException;
-import com.usoftchina.saas.money.mapper.BanksubledgerMapper;
-import com.usoftchina.saas.money.mapper.OthspendingsMapper;
-import com.usoftchina.saas.money.mapper.OthspendingsdetailMapper;
-import com.usoftchina.saas.money.mapper.StatsinfoMapper;
+import com.usoftchina.saas.money.mapper.*;
 import com.usoftchina.saas.money.po.*;
 import com.usoftchina.saas.money.po.*;
 import com.usoftchina.saas.money.service.OthspendingsService;
 import com.usoftchina.saas.money.service.OthspendingsService;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.page.PageRequest;
@@ -45,6 +42,12 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
     private StatsinfoMapper statsinfoMapper;
     private StatsinfoMapper statsinfoMapper;
     @Autowired
     @Autowired
     private MessageLogService messageLogService;
     private MessageLogService messageLogService;
+    @Autowired
+    private BankinformationMapper bankinformationMapper;
+    @Autowired
+    private SubledgerMapper subledgerMapper;
+    @Autowired
+    private PaybalanceMapper paybalanceMapper;
 
 
     @Override
     @Override
     public DocBaseDTO insert(Othsp othsp) {
     public DocBaseDTO insert(Othsp othsp) {
@@ -149,6 +152,48 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
                     othspendings.getOs_bankcode(), "+");
                     othspendings.getOs_bankcode(), "+");
         }
         }
 
 
+        //资金账号表
+        int bk_id = othspendings.getOs_bankid();
+
+        Double bk_amount = othspendings.getOs_amount();
+        //付款方
+        Bankinformation bankinformation = bankinformationMapper.selectByPrimaryKey(bk_id);
+        Double beginamount = 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);
+        bankinformation.setBk_income(incomme);
+        bankinformation.setBk_spending(spending + bk_amount);
+
+        /**
+         * ve_preamount=nvl(ve_preamount,0)+pb_preamount,
+         * ve_payamount=nvl(ve_payamount,0)-pb_pbdamount,
+         * ve_leftamount=ve_beginapamount-ve_beginprepayamount+ve_payamount-ve_preamount;
+         */
+        Vendor vendorData = paybalanceMapper.selectVendorByPrimaryKey(othspendings.getOs_vendid());
+        Double preamount = vendorData.getVe_preamount()==null?new Double(0):vendorData.getVe_preamount();
+        Double beginapamount = vendorData.getVe_beginapamount()==null?new Double(0):vendorData.getVe_beginapamount();
+        Double beginprepayamount= vendorData.getVe_beginprepayamount()==null?new Double(0):vendorData.getVe_beginprepayamount();
+        Double payamount = vendorData.getVe_payamount()==null?new Double(0):vendorData.getVe_payamount();
+
+        Vendor vendor = new Vendor();
+        vendor.setId(Long.valueOf(othspendings.getOs_vendid()));
+        vendor.setVe_preamount(preamount);
+        vendor.setVe_payamount(payamount - bk_amount);
+        vendor.setVe_leftamount(beginapamount-beginprepayamount+payamount-bk_amount-preamount);
+        paybalanceMapper.updateVendorByPrimaryKeySelective(vendor);
+
+        //插入subledger中间表
+        Subledger subledger = new Subledger();
+        subledger.setSl_code(othspendings.getOs_code());
+        subledger.setSl_kind("其他支出单");
+        subledger.setSl_custid(0);
+        subledger.setSl_vendid(othspendings.getOs_vendid());
+        subledger.setSl_date(othspendings.getOs_date());
+        subledger.setSl_amount(bk_amount);
+        subledger.setCompanyId(BaseContextHolder.getCompanyId());
+        subledgerMapper.insertSelective(subledger);
+
         //计算期间金额
         //计算期间金额
         Statsinfo statsinfo = new Statsinfo();
         Statsinfo statsinfo = new Statsinfo();
         List<Integer> ymList = othspendingsdetailMapper.selectYm(Math.toIntExact(id));
         List<Integer> ymList = othspendingsdetailMapper.selectYm(Math.toIntExact(id));
@@ -180,6 +225,7 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
         //删除中间表
         //删除中间表
         othspendings = othspendingsMapper.selectByPrimaryKey(id);
         othspendings = othspendingsMapper.selectByPrimaryKey(id);
         banksubledgerMapper.deleteByPrimaryKey(othspendings.getOs_code(), "其他收入单");
         banksubledgerMapper.deleteByPrimaryKey(othspendings.getOs_code(), "其他收入单");
+        subledgerMapper.deleteByPrimaryKey(othspendings.getOs_code(), "其他支出单");
 
 
         //资金
         //资金
         Double amount = banksubledgerMapper.selectThisamount(othspendings.getOs_bankcode());
         Double amount = banksubledgerMapper.selectThisamount(othspendings.getOs_bankcode());
@@ -192,6 +238,38 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
                     othspendings.getOs_bankcode(), "-");
                     othspendings.getOs_bankcode(), "-");
         }
         }
 
 
+        //资金账号表
+        int bk_id = othspendings.getOs_bankid();
+
+        Double bk_amount = othspendings.getOs_amount();
+        //付款方
+        Bankinformation bankinformation = bankinformationMapper.selectByPrimaryKey(bk_id);
+        Double beginamount = 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);
+        bankinformation.setBk_income(incomme);
+        bankinformation.setBk_spending(spending + bk_amount);
+
+        /**
+         * ve_preamount=nvl(ve_preamount,0)+pb_preamount,
+         * ve_payamount=nvl(ve_payamount,0)-pb_pbdamount,
+         * ve_leftamount=ve_beginapamount-ve_beginprepayamount+ve_payamount-ve_preamount;
+         */
+        Vendor vendorData = paybalanceMapper.selectVendorByPrimaryKey(othspendings.getOs_vendid());
+        Double preamount = vendorData.getVe_preamount()==null?new Double(0):vendorData.getVe_preamount();
+        Double beginapamount = vendorData.getVe_beginapamount()==null?new Double(0):vendorData.getVe_beginapamount();
+        Double beginprepayamount= vendorData.getVe_beginprepayamount()==null?new Double(0):vendorData.getVe_beginprepayamount();
+        Double payamount = vendorData.getVe_payamount()==null?new Double(0):vendorData.getVe_payamount();
+
+        Vendor vendor = new Vendor();
+        vendor.setId(Long.valueOf(othspendings.getOs_vendid()));
+        vendor.setVe_preamount(preamount);
+        vendor.setVe_payamount(payamount + bk_amount);
+        vendor.setVe_leftamount(beginapamount+beginprepayamount-payamount+bk_amount+preamount);
+        paybalanceMapper.updateVendorByPrimaryKeySelective(vendor);
+
+
         //计算期间金额
         //计算期间金额
         Statsinfo statsinfo = new Statsinfo();
         Statsinfo statsinfo = new Statsinfo();
         List<Integer> ymList = othspendingsdetailMapper.selectYm(id);
         List<Integer> ymList = othspendingsdetailMapper.selectYm(id);

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

@@ -538,7 +538,7 @@ public class RecbalanceServiceImpl extends CommonBaseServiceImpl<RecbalanceMappe
             banksubledger.setBl_date(recbalance.getRb_date());
             banksubledger.setBl_date(recbalance.getRb_date());
 
 
             if (recbalance.getRb_custid() == null || recbalance.getRb_custid() != 0){
             if (recbalance.getRb_custid() == null || recbalance.getRb_custid() != 0){
-                banksubledger.setBl_asstype("供应商往来");
+                banksubledger.setBl_asstype("客户往来");
             }
             }
             banksubledger.setBl_assid(recbalance.getRb_custid());
             banksubledger.setBl_assid(recbalance.getRb_custid());
             banksubledger.setBl_asscode(recbalance.getRb_custcode());
             banksubledger.setBl_asscode(recbalance.getRb_custcode());

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

@@ -33,8 +33,8 @@
   <sql id="Base_Column_List" >
   <sql id="Base_Column_List" >
     os_id, os_code, os_date, os_vendid, os_vendcode, os_vendname, os_bankid, os_bankcode, 
     os_id, os_code, os_date, os_vendid, os_vendcode, os_vendname, os_bankid, os_bankcode, 
     os_bankname, os_amount, os_recorderid, os_recorder, os_recorddate, os_status, os_statuscode, 
     os_bankname, os_amount, os_recorderid, os_recorder, os_recorddate, os_status, os_statuscode, 
-    os_remark, othspendingsdetail.companyId, othspendingsdetail.updaterId,
-    othspendingsdetail.updatedate, os_text1, os_text2, os_text3, os_text4,
+    os_remark, companyId, updaterId,
+    updatedate, os_text1, os_text2, os_text3, os_text4,
     os_text5
     os_text5
   </sql>
   </sql>
   <sql id="Detail_Column_List" >
   <sql id="Detail_Column_List" >

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

@@ -17,10 +17,6 @@ public interface ProdIODetailMapper extends CommonBaseMapper<ProdIODetail> {
 
 
     int updateByPrimaryKeySelective(ProdIODetail record);
     int updateByPrimaryKeySelective(ProdIODetail record);
 
 
-    int updateByPrimaryKeyWithBLOBs(ProdIODetail record);
-
-    int updateByPrimaryKey(ProdIODetail record);
-
     void batchInsert(List<ProdIODetail> list);
     void batchInsert(List<ProdIODetail> list);
 
 
     void batchUpdate(List<ProdIODetail> list);
     void batchUpdate(List<ProdIODetail> list);

+ 0 - 4
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdInOutMapper.java

@@ -15,10 +15,6 @@ public interface ProdInOutMapper extends CommonBaseMapper<ProdInOut> {
 
 
     int updateByPrimaryKeySelective(ProdInOut record);
     int updateByPrimaryKeySelective(ProdInOut record);
 
 
-    int updateByPrimaryKeyWithBLOBs(ProdInOut record);
-
-    int updateByPrimaryKey(ProdInOut record);
-
     Integer validateCodeWhenInsert(@Param("pi_inoutno") String pi_inoutno, @Param("companyId") Long companyId);
     Integer validateCodeWhenInsert(@Param("pi_inoutno") String pi_inoutno, @Param("companyId") Long companyId);
 
 
     Integer validateCodeWhenUpdate(@Param("pi_inoutno") String pi_inoutno, @Param("id") Long id,@Param("companyId") Long companyId);
     Integer validateCodeWhenUpdate(@Param("pi_inoutno") String pi_inoutno, @Param("id") Long id,@Param("companyId") Long companyId);

+ 0 - 85
applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -465,91 +465,6 @@
     </set>
     </set>
     where pd_id = #{id,jdbcType=INTEGER}
     where pd_id = #{id,jdbcType=INTEGER}
   </update>
   </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail">
-    update prodiodetail
-    set pd_piid = #{pd_piid,jdbcType=INTEGER},
-      pd_inoutno = #{pd_inoutno,jdbcType=VARCHAR},
-      pd_piclass = #{pd_piclass,jdbcType=VARCHAR},
-      pd_pdno = #{pd_pdno,jdbcType=INTEGER},
-      pd_ordercode = #{pd_ordercode,jdbcType=VARCHAR},
-      pd_orderdetno = #{pd_orderdetno,jdbcType=INTEGER},
-      pd_prodid = #{pd_prodid,jdbcType=INTEGER},
-      pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
-      pd_unit = #{pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{pd_inqty,jdbcType=DOUBLE},
-      pd_outqty = #{pd_outqty,jdbcType=DOUBLE},
-      pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
-      pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
-      pd_price = #{pd_price,jdbcType=DOUBLE},
-      pd_total = #{pd_total,jdbcType=DOUBLE},
-      pd_taxrate = #{pd_taxrate,jdbcType=DOUBLE},
-      pd_netprice = #{pd_netprice,jdbcType=DOUBLE},
-      pd_nettotal = #{pd_nettotal,jdbcType=DOUBLE},
-      pd_whid = #{pd_whid,jdbcType=INTEGER},
-      pd_whcode = #{pd_whcode,jdbcType=VARCHAR},
-      pd_whname = #{pd_whname,jdbcType=VARCHAR},
-      pd_inwhid = #{pd_inwhid,jdbcType=INTEGER},
-      pd_inwhcode = #{pd_inwhcode,jdbcType=VARCHAR},
-      pd_inwhname = #{pd_inwhname,jdbcType=VARCHAR},
-      pd_orderid = #{pd_orderid,jdbcType=INTEGER},
-      pd_sdid = #{pd_sdid,jdbcType=INTEGER},
-      pd_status = #{pd_status,jdbcType=INTEGER},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterid = #{updaterid,jdbcType=INTEGER},
-      updatetime = #{updatetime,jdbcType=TIMESTAMP},
-      pd_text1 = #{pd_text1,jdbcType=VARCHAR},
-      pd_text2 = #{pd_text2,jdbcType=VARCHAR},
-      pd_text3 = #{pd_text3,jdbcType=VARCHAR},
-      pd_text4 = #{pd_text4,jdbcType=VARCHAR},
-      pd_text5 = #{pd_text5,jdbcType=VARCHAR},
-      pd_ym = #{pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{pd_yqty,jdbcType=DOUBLE},
-      pd_remark = #{pd_remark,jdbcType=LONGVARCHAR},
-      pd_ioid = #{pd_ioid,jdbcType=INTEGER}
-    where pd_id = #{pd_id,jdbcType=INTEGER}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail">
-    update prodiodetail
-    set pd_piid = #{pd_piid,jdbcType=INTEGER},
-      pd_inoutno = #{pd_inoutno,jdbcType=VARCHAR},
-      pd_piclass = #{pd_piclass,jdbcType=VARCHAR},
-      pd_pdno = #{pd_pdno,jdbcType=INTEGER},
-      pd_ordercode = #{pd_ordercode,jdbcType=VARCHAR},
-      pd_orderdetno = #{pd_orderdetno,jdbcType=INTEGER},
-      pd_prodid = #{pd_prodid,jdbcType=INTEGER},
-      pd_prodcode = #{pd_prodcode,jdbcType=VARCHAR},
-      pd_unit = #{pd_unit,jdbcType=VARCHAR},
-      pd_inqty = #{pd_inqty,jdbcType=DOUBLE},
-      pd_outqty = #{pd_outqty,jdbcType=DOUBLE},
-      pd_orderprice = #{pd_orderprice,jdbcType=DOUBLE},
-      pd_sendprice = #{pd_sendprice,jdbcType=DOUBLE},
-      pd_price = #{pd_price,jdbcType=DOUBLE},
-      pd_total = #{pd_total,jdbcType=DOUBLE},
-      pd_taxrate = #{pd_taxrate,jdbcType=DOUBLE},
-      pd_netprice = #{pd_netprice,jdbcType=DOUBLE},
-      pd_nettotal = #{pd_nettotal,jdbcType=DOUBLE},
-      pd_whid = #{pd_whid,jdbcType=INTEGER},
-      pd_whcode = #{pd_whcode,jdbcType=VARCHAR},
-      pd_whname = #{pd_whname,jdbcType=VARCHAR},
-      pd_inwhid = #{pd_inwhid,jdbcType=INTEGER},
-      pd_inwhcode = #{pd_inwhcode,jdbcType=VARCHAR},
-      pd_inwhname = #{pd_inwhname,jdbcType=VARCHAR},
-      pd_orderid = #{pd_orderid,jdbcType=INTEGER},
-      pd_sdid = #{pd_sdid,jdbcType=INTEGER},
-      pd_status = #{pd_status,jdbcType=INTEGER},
-      companyid = #{companyid,jdbcType=INTEGER},
-      updaterid = #{updaterid,jdbcType=INTEGER},
-      updatetime = #{updatetime,jdbcType=TIMESTAMP},
-      pd_text1 = #{pd_text1,jdbcType=VARCHAR},
-      pd_text2 = #{pd_text2,jdbcType=VARCHAR},
-      pd_text3 = #{pd_text3,jdbcType=VARCHAR},
-      pd_text4 = #{pd_text4,jdbcType=VARCHAR},
-      pd_text5 = #{pd_text5,jdbcType=VARCHAR},
-      pd_ym = #{pd_ym,jdbcType=INTEGER},
-      pd_yqty = #{pd_yqty,jdbcType=DOUBLE},
-      pd_ioid = #{pd_ioid,jdbcType=INTEGER}
-    where pd_id = #{pd_id,jdbcType=INTEGER}
-  </update>
   <insert id="batchInsert" parameterType="java.util.List" >
   <insert id="batchInsert" parameterType="java.util.List" >
     insert into prodiodetail (pd_piid, pd_inoutno,
     insert into prodiodetail (pd_piid, pd_inoutno,
     pd_piclass, pd_pdno, pd_ordercode,
     pd_piclass, pd_pdno, pd_ordercode,

+ 1 - 60
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -27,10 +27,8 @@
     <result column="companyid" property="companyId" jdbcType="BIGINT" />
     <result column="companyid" property="companyId" jdbcType="BIGINT" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
-    <!--<result column="updater" jdbcType="VARCHAR" property="updater" />-->
     <result column="creatorid" property="creatorId" jdbcType="INTEGER"/>
     <result column="creatorid" property="creatorId" jdbcType="INTEGER"/>
     <result column="createtime" property="createTime" jdbcType="TIMESTAMP" />
     <result column="createtime" property="createTime" jdbcType="TIMESTAMP" />
-    <!--<result column="creator" property="creator" jdbcType="VARCHAR" />-->
     <result column="pi_text1" jdbcType="VARCHAR" property="pi_text1" />
     <result column="pi_text1" jdbcType="VARCHAR" property="pi_text1" />
     <result column="pi_text2" jdbcType="VARCHAR" property="pi_text2" />
     <result column="pi_text2" jdbcType="VARCHAR" property="pi_text2" />
     <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
     <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
@@ -52,7 +50,7 @@
     pi_id, pi_inoutno, pi_class, pi_date, pi_vendid, pi_vendcode, pi_vendname, pi_custid, 
     pi_id, pi_inoutno, pi_class, pi_date, pi_vendid, pi_vendcode, pi_vendname, pi_custid, 
     pi_custcode, pi_custname, pi_puid, pi_pucode, pi_said, pi_sacode, pi_total, pi_recordmanid, 
     pi_custcode, pi_custname, pi_puid, pi_pucode, pi_said, pi_sacode, pi_total, pi_recordmanid, 
     pi_recordman, pi_recorddate, pi_status, pi_statuscode, pi_printstatus, pi_printstatuscode, 
     pi_recordman, pi_recorddate, pi_status, pi_statuscode, pi_printstatus, pi_printstatuscode, 
-    companyid, updaterid, updatetime,updater,creatorid,createtime,creator, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5,pi_auditdate,
+    companyid, updaterid, updatetime,creatorid,createtime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5,pi_auditdate,
     pi_auditman,pi_remark,pi_ioid
     pi_auditman,pi_remark,pi_ioid
   </sql>
   </sql>
   <sql id="Blob_Column_List">
   <sql id="Blob_Column_List">
@@ -149,23 +147,15 @@
       <if test="updateTime != null" >
       <if test="updateTime != null" >
         updateTime,
         updateTime,
       </if>
       </if>
-      <if test="updater != null" >
-        updater,
-      </if>
       <if test="creatorId != null" >
       <if test="creatorId != null" >
         creatorId,
         creatorId,
       </if>
       </if>
       <if test="createTime != null" >
       <if test="createTime != null" >
         createTime,
         createTime,
       </if>
       </if>
-      <if test="creator != null" >
-        creator,
-      </if>
-
       <if test="pi_text1 != null">
       <if test="pi_text1 != null">
         pi_text1,
         pi_text1,
       </if>
       </if>
-
       <if test="pi_text2 != null">
       <if test="pi_text2 != null">
         pi_text2,
         pi_text2,
       </if>
       </if>
@@ -266,19 +256,12 @@
       <if test="updateTime != null" >
       <if test="updateTime != null" >
         #{updateTime,jdbcType=TIMESTAMP},
         #{updateTime,jdbcType=TIMESTAMP},
       </if>
       </if>
-      <if test="updater != null" >
-        #{updater,jdbcType=VARCHAR},
-      </if>
       <if test="creatorId != null" >
       <if test="creatorId != null" >
         #{creatorId,jdbcType=INTEGER},
         #{creatorId,jdbcType=INTEGER},
       </if>
       </if>
       <if test="createTime != null" >
       <if test="createTime != null" >
         #{createTime,jdbcType=TIMESTAMP},
         #{createTime,jdbcType=TIMESTAMP},
       </if>
       </if>
-      <if test="creator != null" >
-        #{creator,jdbcType=VARCHAR},
-      </if>
-
       <if test="pi_text1 != null">
       <if test="pi_text1 != null">
         #{pi_text1,jdbcType=VARCHAR},
         #{pi_text1,jdbcType=VARCHAR},
       </if>
       </if>
@@ -387,9 +370,6 @@
       <if test="updateTime != null" >
       <if test="updateTime != null" >
         updateTime = #{updateTime,jdbcType=TIMESTAMP},
         updateTime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       </if>
-      <!--<if test="updater != null" >-->
-        <!--updater = #{updater,jdbcType=VARCHAR},-->
-      <!--</if>-->
       <if test="pi_text1 != null">
       <if test="pi_text1 != null">
         pi_text1 = #{pi_text1,jdbcType=VARCHAR},
         pi_text1 = #{pi_text1,jdbcType=VARCHAR},
       </if>
       </if>
@@ -420,45 +400,6 @@
     </set>
     </set>
     where pi_id = #{id,jdbcType=INTEGER}
     where pi_id = #{id,jdbcType=INTEGER}
   </update>
   </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
-    update prodinout
-    set pi_inoutno = #{pi_inoutno,jdbcType=VARCHAR},
-      pi_class = #{pi_class,jdbcType=VARCHAR},
-      pi_date = #{pi_date,jdbcType=TIMESTAMP},
-      pi_vendid = #{pi_vendid,jdbcType=INTEGER},
-      pi_vendcode = #{pi_vendcode,jdbcType=VARCHAR},
-      pi_vendname = #{pi_vendname,jdbcType=VARCHAR},
-      pi_custid = #{pi_custid,jdbcType=INTEGER},
-      pi_custcode = #{pi_custcode,jdbcType=VARCHAR},
-      pi_custname = #{pi_custname,jdbcType=VARCHAR},
-      pi_puid = #{pi_puid,jdbcType=INTEGER},
-      pi_pucode = #{pi_pucode,jdbcType=VARCHAR},
-      pi_said = #{pi_said,jdbcType=INTEGER},
-      pi_sacode = #{pi_sacode,jdbcType=VARCHAR},
-      pi_total = #{pi_total,jdbcType=DOUBLE},
-      pi_recordmanid = #{pi_recordmanid,jdbcType=INTEGER},
-      pi_recordman = #{pi_recordman,jdbcType=VARCHAR},
-      pi_recorddate = #{createTime,jdbcType=TIMESTAMP},
-      pi_status = #{pi_status,jdbcType=VARCHAR},
-      pi_statuscode = #{pi_statuscode,jdbcType=VARCHAR},
-      pi_printstatus = #{pi_printstatus,jdbcType=VARCHAR},
-      pi_printstatuscode = #{pi_printstatuscode,jdbcType=VARCHAR},
-
-      companyid = #{companyId,jdbcType=INTEGER},
-      updaterId = #{updaterId,jdbcType=INTEGER},
-      updateTime = #{updateTime,jdbcType=TIMESTAMP},
-      updater = #{updater,jdbcType=VARCHAR},
-      pi_text1 = #{pi_text1,jdbcType=VARCHAR},
-      pi_text2 = #{pi_text2,jdbcType=VARCHAR},
-      pi_text3 = #{pi_text3,jdbcType=VARCHAR},
-      pi_text4 = #{pi_text4,jdbcType=VARCHAR},
-      pi_text5 = #{pi_text5,jdbcType=VARCHAR},
-      pi_address = #{pi_address,jdbcType=LONGVARCHAR},
-      pi_auditdate = #{pi_auditdate,jdbcType=TIMESTAMP},
-      pi_auditman = #{pi_auditman,jdbcType=VARCHAR},
-      pi_remark = #{pi_remark,jdbcType=VARCHAR}
-    where pi_id = #{pi_id,jdbcType=INTEGER}
-  </update>
 
 
   <select id="validateCodeWhenInsert"  resultType="int">
   <select id="validateCodeWhenInsert"  resultType="int">
     select count(1) from prodinout where pi_inoutno = #{pi_inoutno} and companyid = #{companyId}
     select count(1) from prodinout where pi_inoutno = #{pi_inoutno} and companyid = #{companyId}

+ 7 - 91
applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml

@@ -27,10 +27,10 @@
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
 
 
-    <result column="updater" jdbcType="VARCHAR" property="updater" />
+    <!--<result column="updater" jdbcType="VARCHAR" property="updater" />-->
     <result column="creatorid" property="creatorId" jdbcType="INTEGER"/>
     <result column="creatorid" property="creatorId" jdbcType="INTEGER"/>
     <result column="createtime" property="createTime" jdbcType="TIMESTAMP" />
     <result column="createtime" property="createTime" jdbcType="TIMESTAMP" />
-    <result column="creator" property="creator" jdbcType="VARCHAR" />
+    <!--<result column="creator" property="creator" jdbcType="VARCHAR" />-->
 
 
     <result column="pu_text1" property="pu_text1" jdbcType="VARCHAR" />
     <result column="pu_text1" property="pu_text1" jdbcType="VARCHAR" />
     <result column="pu_text2" property="pu_text2" jdbcType="VARCHAR" />
     <result column="pu_text2" property="pu_text2" jdbcType="VARCHAR" />
@@ -46,7 +46,7 @@
     pu_id, pu_code, pu_date, pu_vendid, PU_VENDCODE, PU_VENDNAME, PU_BUYERID, PU_BUYERCODE, 
     pu_id, pu_code, pu_date, pu_vendid, PU_VENDCODE, PU_VENDNAME, PU_BUYERID, PU_BUYERCODE, 
     PU_BUYERNAME, PU_DELIVERY, PU_TAXTOTAL, PU_TOTAL, PU_REMARK, PU_TOTALUPPER, PU_INDATE, 
     PU_BUYERNAME, PU_DELIVERY, PU_TAXTOTAL, PU_TOTAL, PU_REMARK, PU_TOTALUPPER, PU_INDATE, 
     PU_PRINTSTATUS, PU_PRINTSTATUSCODE, PU_ACCEPTSTATUSCODE, PU_ACCEPTSTATUS, PU_STATUSCODE, 
     PU_PRINTSTATUS, PU_PRINTSTATUSCODE, PU_ACCEPTSTATUSCODE, PU_ACCEPTSTATUS, PU_STATUSCODE, 
-    PU_STATUS, companyid, updaterId, updateTime,updater,creatorid,createtime,creator, pu_text1, pu_text2, pu_text3, pu_text4,
+    PU_STATUS, companyid, updaterId, updateTime,creatorid,createtime, pu_text1, pu_text2, pu_text3, pu_text4,
     pu_text5
     pu_text5
   </sql>
   </sql>
   <sql id="Blob_Column_List" >
   <sql id="Blob_Column_List" >
@@ -64,34 +64,7 @@
     delete from purchase
     delete from purchase
     where pu_id = #{id}
     where pu_id = #{id}
   </delete>
   </delete>
-  <insert id="insert" parameterType="com.usoftchina.saas.purchase.po.Purchase" >
-    insert into purchase (pu_id, pu_code, pu_date, 
-      pu_vendid, PU_VENDCODE, PU_VENDNAME, 
-      PU_BUYERID, PU_BUYERCODE, PU_BUYERNAME, 
-      PU_DELIVERY, PU_TAXTOTAL, PU_TOTAL, 
-      PU_REMARK, PU_TOTALUPPER, PU_INDATE, 
-      PU_PRINTSTATUS, PU_PRINTSTATUSCODE, PU_ACCEPTSTATUSCODE, 
-      PU_ACCEPTSTATUS, PU_STATUSCODE, PU_STATUS, 
-      companyid, updaterId, updateTime,
-      ,updater,creatorid,createtime,creator
-      pu_text1, pu_text2, pu_text3, 
-      pu_text4, pu_text5, PU_SHIPADDRESSCODE
-      )
-    values (#{id,jdbcType=INTEGER}, #{puCode,jdbcType=VARCHAR}, #{puDate,jdbcType=TIMESTAMP},
-      #{puVendid,jdbcType=INTEGER}, #{puVendcode,jdbcType=VARCHAR}, #{puVendname,jdbcType=VARCHAR}, 
-      #{puBuyerid,jdbcType=INTEGER}, #{puBuyercode,jdbcType=VARCHAR}, #{puBuyername,jdbcType=VARCHAR}, 
-      #{puDelivery,jdbcType=TIMESTAMP}, #{puTaxtotal,jdbcType=DOUBLE}, #{puTotal,jdbcType=DOUBLE}, 
-      #{puRemark,jdbcType=VARCHAR}, #{puTotalupper,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
-      #{puPrintstatus,jdbcType=VARCHAR}, #{puPrintstatuscode,jdbcType=VARCHAR}, #{puAcceptstatuscode,jdbcType=VARCHAR}, 
-      #{puAcceptstatus,jdbcType=VARCHAR}, #{puStatuscode,jdbcType=VARCHAR}, #{puStatus,jdbcType=VARCHAR}, 
-      #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP},
 
 
-      #{updater,jdbcType=VARCHAR}, #{creatorid,jdbcType=INTEGER}, #{createtime,jdbcType=TIMESTAMP}, #{creator,jdbcType=VARCHAR},
-
-      #{puText1,jdbcType=VARCHAR}, #{puText2,jdbcType=VARCHAR}, #{puText3,jdbcType=VARCHAR}, 
-      #{puText4,jdbcType=VARCHAR}, #{puText5,jdbcType=VARCHAR}, #{puShipaddresscode,jdbcType=LONGVARCHAR}
-      )
-  </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.purchase.po.Purchase" >
   <insert id="insertSelective" parameterType="com.usoftchina.saas.purchase.po.Purchase" >
     <selectKey resultType="java.lang.Long" keyProperty="id">
     <selectKey resultType="java.lang.Long" keyProperty="id">
       SELECT LAST_INSERT_ID() AS ID
       SELECT LAST_INSERT_ID() AS ID
@@ -167,17 +140,12 @@
       <if test="updateTime != null" >
       <if test="updateTime != null" >
         updateTime,
         updateTime,
       </if>
       </if>
-
-      <if test="updater != null" >
-        updater,
-      </if><if test="creatorId != null" >
+      <if test="creatorId != null" >
       creatorId,
       creatorId,
-      </if><if test="createTime != null" >
+      </if>
+      <if test="createTime != null" >
       createTime,
       createTime,
-      </if><if test="creator != null" >
-      creator,
       </if>
       </if>
-
       <if test="pu_text1 != null" >
       <if test="pu_text1 != null" >
         pu_text1,
         pu_text1,
       </if>
       </if>
@@ -268,17 +236,11 @@
         #{updateTime,jdbcType=TIMESTAMP},
         #{updateTime,jdbcType=TIMESTAMP},
       </if>
       </if>
 
 
-      <if test="updater != null" >
-        #{updater,jdbcType=VARCHAR},
-      </if><if test="creatorId != null" >
+      <if test="creatorId != null" >
        #{creatorId,jdbcType=INTEGER},
        #{creatorId,jdbcType=INTEGER},
       </if><if test="createTime != null" >
       </if><if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
        #{createTime,jdbcType=TIMESTAMP},
-      </if><if test="creator != null" >
-       #{creator,jdbcType=VARCHAR},
       </if>
       </if>
-
-
       <if test="pu_text1 != null" >
       <if test="pu_text1 != null" >
         #{pu_text1,jdbcType=VARCHAR},
         #{pu_text1,jdbcType=VARCHAR},
       </if>
       </if>
@@ -368,15 +330,9 @@
       <if test="updaterId != null" >
       <if test="updaterId != null" >
         updaterId = #{updaterId,jdbcType=INTEGER},
         updaterId = #{updaterId,jdbcType=INTEGER},
       </if>
       </if>
-
       <if test="updateTime != null" >
       <if test="updateTime != null" >
         updateTime = #{updateTime,jdbcType=TIMESTAMP},
         updateTime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       </if>
-
-      <if test="updater != null" >
-        updater = #{updater,jdbcType=VARCHAR},
-      </if>
-
       <if test="pu_text1 != null" >
       <if test="pu_text1 != null" >
         pu_text1 = #{pu_text1,jdbcType=VARCHAR},
         pu_text1 = #{pu_text1,jdbcType=VARCHAR},
       </if>
       </if>
@@ -398,39 +354,6 @@
     </set>
     </set>
     where pu_id = #{id,jdbcType=INTEGER}
     where pu_id = #{id,jdbcType=INTEGER}
   </update>
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.purchase.po.Purchase" >
-    update purchase
-    set pu_code = #{pu_code,jdbcType=VARCHAR},
-      pu_date = #{pu_date,jdbcType=TIMESTAMP},
-      pu_vendid = #{pu_vendid,jdbcType=INTEGER},
-      PU_VENDCODE = #{pu_vendcode,jdbcType=VARCHAR},
-      PU_VENDNAME = #{pu_vendname,jdbcType=VARCHAR},
-      PU_BUYERID = #{pu_buyerid,jdbcType=INTEGER},
-      PU_BUYERCODE = #{pu_buyercode,jdbcType=VARCHAR},
-      PU_BUYERNAME = #{pu_buyername,jdbcType=VARCHAR},
-      PU_DELIVERY = #{pu_delivery,jdbcType=TIMESTAMP},
-      PU_TAXTOTAL = #{pu_taxtotal,jdbcType=DOUBLE},
-      PU_TOTAL = #{pu_total,jdbcType=DOUBLE},
-      PU_REMARK = #{pu_remark,jdbcType=VARCHAR},
-      PU_TOTALUPPER = #{pu_totalupper,jdbcType=VARCHAR},
-      PU_INDATE = #{createTime,jdbcType=TIMESTAMP},
-      PU_PRINTSTATUS = #{pu_printstatus,jdbcType=VARCHAR},
-      PU_PRINTSTATUSCODE = #{pu_printstatuscode,jdbcType=VARCHAR},
-      PU_ACCEPTSTATUSCODE = #{pu_acceptstatuscode,jdbcType=VARCHAR},
-      PU_ACCEPTSTATUS = #{pu_acceptstatus,jdbcType=VARCHAR},
-      PU_STATUSCODE = #{pu_statuscode,jdbcType=VARCHAR},
-      PU_STATUS = #{pu_status,jdbcType=VARCHAR},
-      companyid = #{companyId,jdbcType=INTEGER},
-      updaterId = #{updaterId,jdbcType=INTEGER},
-      updateTime = #{updateTime,jdbcType=TIMESTAMP},
-      updater = #{updater,jdbcType=VARCHAR},
-      pu_text1 = #{pu_text1,jdbcType=VARCHAR},
-      pu_text2 = #{pu_text2,jdbcType=VARCHAR},
-      pu_text3 = #{pu_text3,jdbcType=VARCHAR},
-      pu_text4 = #{pu_text4,jdbcType=VARCHAR},
-      pu_text5 = #{pu_text5,jdbcType=VARCHAR}
-    where pu_id = #{id,jdbcType=INTEGER}
-  </update>
   <select id="validateAudit" parameterType="com.usoftchina.saas.commons.dto.DocBaseDTO" resultType="java.lang.String">
   <select id="validateAudit" parameterType="com.usoftchina.saas.commons.dto.DocBaseDTO" resultType="java.lang.String">
     select GROUP_CONCAT(pu_code) from purchase where pu_statuscode='AUDITED' and pu_id in
     select GROUP_CONCAT(pu_code) from purchase where pu_statuscode='AUDITED' and pu_id in
     <foreach collection="list" item="item" open="(" close=")" separator=",">
     <foreach collection="list" item="item" open="(" close=")" separator=",">
@@ -446,13 +369,6 @@
   <select id="validateUnAudit" parameterType="long" resultType="java.lang.String">
   <select id="validateUnAudit" parameterType="long" resultType="java.lang.String">
     select pu_code from purchase where pu_id = #{pu_id} and IFNULL(pu_statuscode,'UNAUDITED')='UNAUDITED'
     select pu_code from purchase where pu_id = #{pu_id} and IFNULL(pu_statuscode,'UNAUDITED')='UNAUDITED'
   </select>
   </select>
-  <!--<select id="selectByTest" resultMap="BaseResultMap" parameterType="string" >
-    select * from purchase <where>
-    <if test="_parameter != null">
-       ${value}
-    </if>
-  </where>
-  </select>-->
   <select id="validateCodeWhenInsert" resultType="int">
   <select id="validateCodeWhenInsert" resultType="int">
     select count(1) from purchase where pu_code = #{code} and companyId =#{companyId}
     select count(1) from purchase where pu_code = #{code} and companyId =#{companyId}
   </select>
   </select>

+ 18 - 7
base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java

@@ -21,16 +21,21 @@ import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.exception.ExceptionCode;
 import com.usoftchina.saas.exception.ExceptionCode;
 import com.usoftchina.saas.page.PageDefault;
 import com.usoftchina.saas.page.PageDefault;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.page.PageRequest;
+import com.usoftchina.saas.server.error.ServletErrorUtils;
 import com.usoftchina.saas.socket.api.SocketMessageApi;
 import com.usoftchina.saas.socket.api.SocketMessageApi;
 import com.usoftchina.saas.utils.BeanMapper;
 import com.usoftchina.saas.utils.BeanMapper;
 import com.usoftchina.saas.utils.CollectionUtils;
 import com.usoftchina.saas.utils.CollectionUtils;
 import com.usoftchina.saas.utils.JsonUtils;
 import com.usoftchina.saas.utils.JsonUtils;
 import com.usoftchina.saas.utils.StringUtils;
 import com.usoftchina.saas.utils.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.bind.annotation.*;
 
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 
 
 /**
 /**
  * @author yingp
  * @author yingp
@@ -67,6 +72,8 @@ public class AuthController {
     @Autowired
     @Autowired
     private SocketMessageApi socketMessageApi;
     private SocketMessageApi socketMessageApi;
 
 
+    private Logger logger = LoggerFactory.getLogger(AuthController.class);
+
     /**
     /**
      * 登录认证获取token
      * 登录认证获取token
      *
      *
@@ -111,14 +118,15 @@ public class AuthController {
     }
     }
 
 
     /**
     /**
-     * 账户中心登录回调
+     * 账户中心登录时jsonp回调
      *
      *
      * @param clientId 客户端唯一标志,发起请求到账户中心时带上
      * @param clientId 客户端唯一标志,发起请求到账户中心时带上
      * @param info
      * @param info
      * @return
      * @return
      */
      */
-    @PostMapping("/sso/callback")
-    public Result ssoCallback(HttpServletRequest request, @RequestParam String clientId, CookieInfo info) {
+    @GetMapping("/sso/callback")
+    public void ssoCallback(HttpServletRequest request, HttpServletResponse response,
+                            String clientId, CookieInfo info) throws IOException{
         if (null != info && null != info.getMobile()) {
         if (null != info && null != info.getMobile()) {
             AccountDTO accountDTO = null;
             AccountDTO accountDTO = null;
             Result<AccountDTO> result = accountApi.getAccount(info.getMobile());
             Result<AccountDTO> result = accountApi.getAccount(info.getMobile());
@@ -127,7 +135,9 @@ public class AuthController {
                     // 新用户,自动注册
                     // 新用户,自动注册
                     accountDTO = createAccountByCookieInfo(info);
                     accountDTO = createAccountByCookieInfo(info);
                 } else {
                 } else {
-                    return Result.error(result.getCode(), result.getMessage());
+                    logger.error(result.getMessage());
+                    ServletErrorUtils.writeMessage(response, "successCallback({success:'0'})");
+                    return;
                 }
                 }
             } else {
             } else {
                 accountDTO = result.getData();
                 accountDTO = result.getData();
@@ -136,7 +146,9 @@ public class AuthController {
                     accountDTO.setUu(info.getUserUU());
                     accountDTO.setUu(info.getUserUU());
                     Result updateResult = accountApi.update(BeanMapper.map(accountDTO, AccountUpdateDTO.class));
                     Result updateResult = accountApi.update(BeanMapper.map(accountDTO, AccountUpdateDTO.class));
                     if (!updateResult.isSuccess()) {
                     if (!updateResult.isSuccess()) {
-                        return Result.error(updateResult.getCode(), updateResult.getMessage());
+                        logger.error(updateResult.getMessage());
+                        ServletErrorUtils.writeMessage(response, "successCallback({success:'0'})");
+                        return;
                     }
                     }
                 }
                 }
             }
             }
@@ -157,9 +169,8 @@ public class AuthController {
                 TokenDTO tokenDTO = BeanMapper.map(jwtToken, TokenDTO.class);
                 TokenDTO tokenDTO = BeanMapper.map(jwtToken, TokenDTO.class);
                 socketMessageApi.sendToClient(clientId, JsonUtils.toJsonString(new AuthDTO(tokenDTO, accountDTO)));
                 socketMessageApi.sendToClient(clientId, JsonUtils.toJsonString(new AuthDTO(tokenDTO, accountDTO)));
             }
             }
-            return Result.success();
+            ServletErrorUtils.writeMessage(response, "successCallback({success:'1'})");
         }
         }
-        return Result.error(ExceptionCode.COOKIE_ILLEGAL_ARGUMENT);
     }
     }
 
 
     /**
     /**

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

@@ -106,17 +106,12 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
                             });
                             });
                             grid.condition = grid.getCondition(items);
                             grid.condition = grid.getCondition(items);
                             grid.store.loadPage(1);
                             grid.store.loadPage(1);
+                            grid.selModel.noChange = true;
+                            grid.selModel.deselectAll();
+                            grid.selModel.select(grid.selectRecordArr);
+                            grid.selModel.noChange = false;
                         }
                         }
                     },'->',{
                     },'->',{
-                        xtype:'button',
-                        text:'新增',
-                        handler:function(b){
-                            var grid = me;
-                            var trigger = grid.ownerCt.trigger;
-                            saas.util.BaseUtil.openTab(trigger.addXtype, '新增'+trigger.addTitle,trigger.addXtype + '_add');
-                        }
-                    },{
-                        xtype:'button',
                         text:'确定',
                         text:'确定',
                         cls:'x-formpanel-btn-blue',
                         cls:'x-formpanel-btn-blue',
                         handler:function(b){
                         handler:function(b){
@@ -147,6 +142,23 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
                             mainGrid.up('detailGridField').fireEvent('edit');
                             mainGrid.up('detailGridField').fireEvent('edit');
                             grid.ownerCt.close();
                             grid.ownerCt.close();
                         }
                         }
+                    },{
+                        xtype:'button',
+                        text:'新增',
+                        handler:function(b){
+                            var grid = me;
+                            var trigger = grid.ownerCt.trigger;
+                            saas.util.BaseUtil.openTab(trigger.addXtype, '新增'+trigger.addTitle,trigger.addXtype + '_add');
+                        },
+                        listeners:{
+                            afterrender:function(b){
+                                var grid = me;
+                                var trigger = grid.ownerCt.trigger;
+                                if(!trigger.addXtype||trigger.addXtype==''){
+                                    b.hide();
+                                }
+                            }
+                        }
                     }])
                     }])
                 },{
                 },{
                     xtype: 'pagingtoolbar',
                     xtype: 'pagingtoolbar',

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

@@ -226,7 +226,9 @@ Ext.define('saas.view.core.dbfind.MultiDbfindTrigger', {
                             if(nowRec.get(item.to)&&nowRec.get(item.to)!=""){
                             if(nowRec.get(item.to)&&nowRec.get(item.to)!=""){
                                 nowRec.set(item.to,null);
                                 nowRec.set(item.to,null);
                             }
                             }
-                            delete nowRec.modified[item.to];
+                            if(nowRec.modified){
+                                delete nowRec.modified[item.to];
+                            }
                             if(JSON.stringify(nowRec.modified)=="{}"){
                             if(JSON.stringify(nowRec.modified)=="{}"){
                                 nowRec.dirty = false
                                 nowRec.dirty = false
                             }
                             }

+ 214 - 0
frontend/saas-web/app/view/core/form/DataMultiCombo.js

@@ -0,0 +1,214 @@
+/**
+ * Created by zhouy on 2018/10/17.
+ */
+Ext.define('saas.view.core.form.DataMultiCombo', {
+    extend: 'Ext.form.field.Trigger',
+    alias: 'widget.datamulticombo',
+    editable : false,
+    matchFieldWidth: true,
+    value: [],
+    cachedConfig: {
+        menuAlign: 'tl-bl?',
+        destroyMenu: true
+    },
+    initComponent: function() {
+        var me = this;
+        //获取数据
+        if(me.dataUrl){
+            Ext.Ajax.request({  
+                url : me.dataUrl,
+                timeout: 100000000,  
+                method : 'post',  
+                params : {}  ,
+                headers:{
+                    'Access-Control-Allow-Origin': '*',
+                    'Authorization':  saas.util.State.get('session').token
+                },
+                success: function(fp, o){
+                    // if(o.result.error){
+                    //     showError(o.result.error);
+                    // } else {
+                    //     var msg = Ext.getCmp('baseform').ownerCt.ownerCt.down('htmleditor[name=msg]');
+                    //     var imgel=msg.getEl().dom.getElementsByTagName('iframe')[0].contentWindow.document.body;
+                    //     if(imgel.getElementsByTagName('img').length>0){
+                    //       imgel.removeChild(imgel.getElementsByTagName('img')[0]);
+                    //     }
+                    //     //Ext.getCmp('baseform').ownerCt.ownerCt.down('hidden').setValue('../../../'+o.result.path);
+                    //     Ext.getCmp('baseform').ownerCt.setValue(o.result.path);
+                    //     var element = document.createElement("img");
+                    //     element.src = basePath + 'common/download.action?path=' + o.result.path.replace(/\+/g, '%2B');
+                    //     element.style="width:100%;height:100%";            
+                    //     element.title = '&img' + o.result.filepath + ";";
+                    //     msg.setValue('<img src="'+element.src+'" style=width:100%;height:100%;>');
+                    // }
+                },
+                failure: function (response, opts) {
+                    showToast('上传失败: ' + response.responseText);
+                }
+            });
+            me.BaseUtil.request({
+                url: me.dataUrl,
+                params: '',
+                method: 'POST',
+                async:false
+            })
+            .then(function(localJson) {
+                if(localJson.success){
+                }
+            })
+            .catch(function(res) {
+                console.error(res);
+                showToast('保存失败: ' + res.message);
+            });
+
+            // datas: [
+            //     ["已审核", "已审核"],
+            //     ["未审核", "未审核"]
+            // ]
+        }
+        me.callParent(arguments);
+    },
+    listeners:{
+        afterrender:function(f){
+            this.mon(f.el,{
+                mouseover: this.onMouseOver,
+                mouseleave:this.onMouseLeave,
+                scope:this
+            });
+        }
+
+    },
+    onMouseOver:function(){
+       this.showMenu();
+    },
+    onMouseLeave:function(a,b,c){
+        this.hideMenu(a.parentEvent?a:b);//el光标离开第二个参数为Event对象
+    },
+    onTriggerClick:function(){
+        this.showMenu();
+    },
+    getMenu: function() {
+        var me = this;
+
+        if (!me.menu) {
+
+            me.menu = Ext.create('Ext.menu.Menu',{
+                hideOnParentHide: false,
+                items: me.getMenuItems(),
+                listeners:{
+                    mouseleave:me.onMouseLeave,
+                    scope:me
+                }
+            });
+        }
+        return me.menu;
+    },
+    getMenuItems:function(){
+        var me = this,
+            i = 0,
+            item,
+            items = me.datas,
+            itemsLn = me.datas.length,
+            menuItems = [],
+            value = me.value;
+        for (; i < itemsLn; i++) {
+            item = items[i];
+            var checked = !!value.find(function(v) {
+                return v.value = iem[0];
+            });
+            menuItem = new Ext.menu.CheckItem({
+                text: item[1],
+                checked: checked,
+                checkValue:item[0],
+                hideOnClick: false,
+                checkHandler: this.onCheckChange,
+                scope: this
+            });
+            menuItems.push(menuItem);
+        }
+        return menuItems.length ? menuItems : null;
+    },
+    onCheckChange:function(checkItem, checked){
+        var items=this.menu.items.items,
+            checkedItems = [];
+        Ext.Array.each(items,function(item){
+            if(item.checked){
+                checkedItems.push({
+                    text: item.text,
+                    value: item.checkValue
+                });
+            }
+        });
+        this.setValue(checkedItems);
+    },
+
+    setValue: function(items) {
+        var me = this, rawV = '',
+        datas = me.datas,
+        menu = me.menu;
+        if(!Ext.isArray(items)) {
+            items = [items]
+        }
+        items.map(function(item, index) {
+            if(Ext.isString(item)) {
+                var data = datas.find(function(d) {
+                    return d[0] == item;
+                });
+                items[index] = {
+                    text: data[1],
+                    value: data[0]
+                }
+            }
+        })
+        rawV = items.map(function(item) {
+            return item.text
+        }).join(',');
+        this.setRawValue(rawV);
+        this.value = items;
+        if(menu) {
+            Ext.Array.each(menu.items.items, function(item) {
+                item.setChecked(!!items.find(function(i) {
+                    return i.value == item.checkValue;
+                }));
+            });
+        }
+        this.publishState('value', items);
+    },
+
+    showMenu: function (e, menu) {
+        menu = menu || this.getMenu();
+        /**
+         * menu上边框样式待处理
+         * */
+        if (menu) {
+            if (menu.isVisible()) {
+                    menu.focus();
+            } else {
+                menu.autoFocus = true;
+                if(this.matchFieldWidth){
+                    menu.setWidth(this.bodyEl.getWidth());
+                }
+                if (menu.isMenu) {
+                    menu.showBy(this.inputEl, this.getMenuAlign(),[-1, 0]);
+                } else if (menu.isViewportMenu) {
+                    menu.setDisplayed(!menu.getDisplayed());
+                } else {
+                    menu.show();
+                }
+            }
+        }
+    },
+    hideMenu: function(b) {
+        if (this.hasVisibleMenu()) {
+            var target=b.parentEvent.relatedTarget;
+            if(!((target.className && target.className.indexOf('x-menu')!=-1) || (target.name && target.name.indexOf(this.name)!=-1))){
+                this.menu.hide();
+            }
+        }
+        return this;
+    },
+    hasVisibleMenu: function() {
+        var menu = this.menu;
+        return menu && menu.rendered && menu.isVisible();
+    }
+});

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

@@ -219,6 +219,34 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 maxLength: 200
                 maxLength: 200
             }]
             }]
         },
         },
+        accountinformation:{
+            items:[{
+                xtype:'hidden',
+                name:'roleIds',
+                hidden:true,
+            },{
+                xtype:'datamulticombo',
+                dataUrl:'/api/account/role/list',
+                fieldLabel: '关联角色',
+                name: 'roleNames',
+                allowBlank:false,
+                maxLength: 20
+            },{
+                xtype:'textfield',
+                fieldLabel: '联系电话',
+                name: 'mobile',
+                allowBlank:true,
+                maxLength: 30,
+                beforeLabelTextTpl: "",
+            },{
+                xtype:'textfield',
+                fieldLabel: '联系邮件',
+                name: 'email',
+                allowBlank:true,
+                maxLength: 30,
+                beforeLabelTextTpl: "",
+            }]
+        },
         warehouse:{
         warehouse:{
             items:[{
             items:[{
                 xtype:'hidden',
                 xtype:'hidden',

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

@@ -60,7 +60,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
         fieldLabel : "交货地址", 
         fieldLabel : "交货地址", 
         allowBlank : false, 
         allowBlank : false, 
         columnWidth : 0.5,
         columnWidth : 0.5,
-        hiddenBtn:false,//true 则会关闭新增按钮功能
+        hiddenBtn:true,//true 则会关闭新增按钮功能
         addHandler:function(b){
         addHandler:function(b){
             var document = Ext.create('saas.view.document.kind.Kind',{});
             var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             var form = this.ownerCmp.ownerCt;

+ 7 - 8
frontend/saas-web/app/view/sys/account/DataList.js

@@ -73,7 +73,7 @@ Ext.define('saas.view.sys.account.DataList', {
     },{
     },{
         text : '联系邮箱', 
         text : '联系邮箱', 
         dataIndex : 'email', 
         dataIndex : 'email', 
-        width : 120.0, 
+        width : 220.0, 
         xtype : '', 
         xtype : '', 
     },{
     },{
         text : '关联角色id', 
         text : '关联角色id', 
@@ -84,7 +84,7 @@ Ext.define('saas.view.sys.account.DataList', {
     },{
     },{
         text : '关联角色', 
         text : '关联角色', 
         dataIndex : 'roleNames', 
         dataIndex : 'roleNames', 
-        width : 120.0, 
+        flex:1,
         xtype : '', 
         xtype : '', 
     }],
     }],
 
 
@@ -185,15 +185,14 @@ Ext.define('saas.view.sys.account.DataList', {
             if(classList.indexOf('fa-pencil')>-1){
             if(classList.indexOf('fa-pencil')>-1){
                 var document = Ext.create('saas.view.document.kind.Kind',{});
                 var document = Ext.create('saas.view.document.kind.Kind',{});
                 var form = this.ownerCt;
                 var form = this.ownerCt;
-                this.dialog = form.getController().getView().add({
+                this.dialog = this.getController().getView().add({
                     xtype: 'document-kind-childwin',
                     xtype: 'document-kind-childwin',
                     bind: {
                     bind: {
-                        title: '修改单据编码规则'
+                        title: '修改账户信息'
                     },
                     },
-                    dataKind:'maxnumbers',
-                    belong:document.etc['maxnumbers'],
-                    _parent:form,
-                    _combo:this,
+                    dataKind:'accountinformation',
+                    belong:document.etc['accountinformation'],
+                    _parent:this,
                     record:record,
                     record:record,
                     session: true
                     session: true
                 });
                 });

+ 321 - 0
frontend/saas-web/app/view/sys/baseconfig/FormPanel.js

@@ -0,0 +1,321 @@
+Ext.define('saas.view.sys.baseconfig.FormPanel', {
+    extend: 'Ext.form.Panel',
+    xtype: 'sys-baseconfig-formpanel',
+
+    controller: 'sys-baseconfig-formpanel',
+    viewModel: 'sys-baseconfig-formpanel',
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+    
+    //字段属性
+    _idField: 'id',
+    _readUrl:'http://192.168.253.31:8560/api/account/company/read/current',
+    _saveUrl:'http://192.168.253.31:8560/api/account/company/save',
+
+    //基础属性
+    frame:true,
+    initId: 0,
+    layout: 'vbox',
+    autoScroll: true,
+    border: 1,
+    bodyPadding: 5,
+
+    fieldDefaults: {
+        margin: '0 5 5 30',
+        labelAlign: 'right',
+        labelWidth: 90,
+        width:300,
+        blankText: '该字段不能为空'
+    },
+
+    bbar:{
+        frame:true,
+        items:['->',{
+            text:'保存',
+            formBind:true,
+            name:'save'
+        },'->']
+    },
+
+    items: [{
+        bind:'{id}',
+        xtype: 'hidden',
+        name: 'id',
+        fieldLabel: 'id',
+        allowBlank: true,
+        width:600
+    },{
+        bind:'{name}',
+        xtype: 'textfield',
+        name: 'name',
+        fieldLabel: '公司名称',
+        allowBlank: true,
+        editable:false,
+        readOnly:true,
+        width:600
+    },{
+        bind:'{address}',
+        xtype: 'textfield',
+        name: 'address',
+        fieldLabel: '公司地址',
+        beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
+        allowBlank: false,
+        width:600
+    },{
+        bind:'{tel}',
+        xtype: 'textfield',
+        name: 'tel',
+        fieldLabel: '电话',
+        beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
+        allowBlank: false,
+        width:500
+    },{
+        bind:'{fax}',
+        xtype: 'textfield',
+        name: 'fax',
+        fieldLabel: '传真',
+        allowBlank: true,
+        width:500
+    }
+    // ,{
+    //     bind:'{en_begindate}',
+    //     xtype : "datefield", 
+    //     name : "en_begindate",
+    //     format:'Y-m-d H:i:s', 
+    //     fieldLabel : "开账日期", 
+    //     allowBlank : true, 
+    //     editable:false,
+    //     hideTrigger:true,
+    //     readOnly:true,
+    //     width:500
+    // }
+    // ,{ 
+    //     bind:'{en_pricemethod}',
+    //     displayField : "display", 
+    //     editable:false,
+    //     hideTrigger : false, 
+    //     maxLength : 100.0, 
+    //     width:500,
+    //     minValue : null, 
+    //     queryMode : "local", 
+    //     valueField : "value", 
+    //     xtype : "combo",
+    //     value:'WACC',
+    //     store:{
+    //         fields: ['display', 'value'],
+    //         data : [
+    //             {"display":"加权平均法", "value":'WACC'},
+    //             {"display":"先进先出法", "value":'FIFO'}
+    //         ]
+    //     },
+    //     name : "en_pricemethod", 
+    //     beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
+    //     fieldLabel : "库存计算方式", 
+    //     allowBlank : false, 
+    // }
+    // ,{  
+    //     ignore:true,
+    //     bind:'{updateTime}',
+    //     xtype : "datefield", 
+    //     name : "updateTime", 
+    //     fieldLabel : "更新时间", 
+    //     allowBlank : true, 
+    //     hideTrigger:true,
+    //     format:'Y-m-d H:i:s',
+    //     editable:false,
+    //     readOnly:true,
+    //     width:500,
+    // }
+    ,{
+        xtype: 'form',
+		width:600,
+		frame: false,
+		border: false,
+		minHeight: 22,
+		bodyStyle: 'padding:2px;',
+        layout: 'hbox',
+        items:[{
+            bind:'{signet}',
+            name : "signet", 
+            allowBlank : true, 
+            hidden:true,
+            xtype:'numberfield'
+        },{
+            allowBlank : true, 
+            width:500,
+            fieldLabel:'打印章上传',
+            xtype: 'filefield',
+            emptyText: '请选择图片',
+            buttonText: '',
+            buttonConfig: {
+                iconCls: 'x-fa fa-picture-o',
+            },
+            createFileInput : function() {
+                    var me = this;
+                    me.fileInputEl = me.button.el.createChild({
+                    name: me.getName(),
+                    cls: Ext.baseCSSPrefix + 'form-file-input',
+                    tag: 'input',
+                    type: 'file',
+                    size: 1,
+                    accept:"image/*"
+                }).on('change', me.onFileChange, me);
+            },
+            listeners: {
+                afterrender:function(field,ops){
+                    var fileEl = field.fileInputEl.dom;
+                    fileEl.setAttribute("accept","image/*");
+                },
+                change: function(field){
+                    var form = field.ownerCt.ownerCt;
+                    var myForm = field.ownerCt;
+                    var fileEl = field.fileInputEl.dom;
+                    var fd = new FormData();
+                    fd.append('file', fileEl.files[0]);
+                    form.setLoading(true);
+                    Ext.Ajax.request({
+                        url: 'http://192.168.253.31:8560/api/file/upload',//这里是填写需要跨域访问的URL
+                        cors: true,
+                        useDefaultXhrHeader: false,
+                        method: 'post',
+                        rawData: fd,
+                        headers: {
+                            'Access-Control-Allow-Origin': '*',
+                            'Authorization':  saas.util.State.get('session').token,
+                            //"Content-Type": 'multipart/form-data'  //文件上传的格式, 
+                            "Content-Type":null
+                        },
+                        success: function (response, opts) {
+                            form.setLoading(false);
+                            showToast('上传成功');
+                            var res = Ext.decode(response.responseText);
+                            if(res.success){
+                                var data = res.data;
+                                var name = data.name + "  (" + Ext.util.Format.fileSize(data.size) + ")";
+                                myForm.down('[name=signet]').setValue(data.id);
+                                field.setRawValue(name);
+                            }else{
+                                showToast('上传失败: ' + res.message);
+                            }
+                        },
+                        failure: function (response, opts) {
+                            form.setLoading(false);
+                            var res = Ext.decode(response.responseText);
+                            showToast('上传失败: ' + res.message);
+                        }
+                    });
+                }
+            }
+        },{
+            hidden:true,
+            name:'showSignetPhoto',
+            xtype:'button',
+            iconCls: 'x-fa fa-picture-o'
+        }]
+    },{
+        xtype: 'form',
+		width:600,
+		frame: false,
+		border: false,
+		minHeight: 22,
+		bodyStyle: 'padding:2px;',
+        layout: 'hbox',
+        items:[{
+            bind:'{logoUrl}',
+            name : "logoUrl", 
+            allowBlank : true, 
+            hidden:true,
+            xtype:'numberfield'
+        },{
+            allowBlank : true, 
+            width:500,
+            fieldLabel:'Logo上传',
+            xtype: 'filefield',
+            emptyText: '请选择图片',
+            buttonText: '',
+            buttonConfig: {
+                iconCls: 'x-fa fa-picture-o',
+            },
+            createFileInput : function() {
+                    var me = this;
+                    me.fileInputEl = me.button.el.createChild({
+                    name: me.getName(),
+                    cls: Ext.baseCSSPrefix + 'form-file-input',
+                    tag: 'input',
+                    type: 'file',
+                    size: 1,
+                    accept:"image/*"
+                }).on('change', me.onFileChange, me);
+            },
+            listeners: {
+                change: function(field){
+                    var form = field.ownerCt.ownerCt;
+                    var myForm = field.ownerCt;
+                    var fileEl = field.fileInputEl.dom;
+                    var fd = new FormData();
+                    fd.append('file', fileEl.files[0]);
+                    form.setLoading(true);
+                    Ext.Ajax.request({
+                        url: 'http://192.168.253.31:8560/api/file/upload',//这里是填写需要跨域访问的URL
+                        cors: true,
+                        useDefaultXhrHeader: false,
+                        method: 'post',
+                        rawData: fd,
+                        headers: {
+                            'Access-Control-Allow-Origin': '*',
+                            'Authorization':  saas.util.State.get('session').token,
+                            //"Content-Type": 'multipart/form-data'  //文件上传的格式, 
+                            "Content-Type":null
+                        },
+                        success: function (response, opts) {
+                            form.setLoading(false);
+                            showToast('上传成功');
+                            var res = Ext.decode(response.responseText);
+                            if(res.success){
+                                var data = res.data;
+                                var name = data.name + "  (" + Ext.util.Format.fileSize(data.size) + ")";
+                                myForm.down('[name=logoUrl]').setValue(data.id);
+                                field.setRawValue(name);
+                            }else{
+                                showToast('上传失败: ' + res.message);
+                            }
+                        },
+                        failure: function (response, opts) {
+                            form.setLoading(false);
+                            var res = Ext.decode(response.responseText);
+                            showToast('上传失败: ' + res.message);
+                        }
+                    });
+                }
+            }
+        },{
+            hidden:true,
+            name:'showLogoPhoto',
+            xtype:'button',
+            iconCls: 'x-fa fa-picture-o'
+        }]
+    }],
+
+    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);
+        });
+
+        me.callParent(arguments);
+    },
+
+    refresh:function(){
+        this.ownerCt.setTitle('参数设置')
+    }
+});

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

@@ -0,0 +1,66 @@
+Ext.define('saas.view.sys.baseconfig.FormPanelController', {
+    extend: 'Ext.app.ViewController',
+    alias: 'controller.sys-baseconfig-formpanel',
+
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+    FormUtil: Ext.create('saas.util.FormUtil'),
+
+    init: function (form) {
+        var me = this;
+        this.control({
+            'button[name=save]':{
+                click:function(){
+                    me.onSave();
+                }
+            }
+        });
+    },
+
+    onSave: function() {
+        var me = this,
+        form = this.getView();
+
+        var valid = form.isValid();
+        if(!valid) {
+            showToast('表单校验有误,请检查');
+            return false;
+        }
+
+        if(form.getForm().wasDirty==false){
+            showToast('未修改数据,请修改后保存');
+            return false;
+        }
+        
+        viewModel = me.getViewModel();
+        var formData = viewModel.data;
+        formData.en_name = null;
+        formData.updateTime = null;
+        me.BaseUtil.request({
+            url: form._saveUrl,
+            params: JSON.stringify(formData),
+            method: 'POST',
+        })
+        .then(function(localJson) {
+            if(localJson.success){
+                showToast('保存成功');
+                viewModel = form.getViewModel();
+                var url = form._readUrl;
+                form.BaseUtil.request({url })
+                .then(function(res) {
+                    if(res.success) {
+                        var d = res.data;
+                        viewModel.setData(d)
+                    }
+                })
+                .catch(function(response) {
+                    console.error(response);
+                });
+            }
+        })
+        .catch(function(res) {
+            console.error(res);
+            showToast('保存失败: ' + res.message);
+        });
+    }
+
+});

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

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

+ 232 - 82
frontend/saas-web/app/view/sys/config/FormPanel.js

@@ -7,8 +7,8 @@ Ext.define('saas.view.sys.config.FormPanel', {
     
     
     //字段属性
     //字段属性
     _idField: 'id',
     _idField: 'id',
-    _readUrl:'/api/commons/enterprise/read',
-    _saveUrl:'/api/commons/enterprise/save',
+    _readUrl:'http://192.168.253.31:8560/api/account/company/read/current',
+    _saveUrl:'http://192.168.253.31:8560/api/account/company/save',
 
 
     //基础属性
     //基础属性
     frame:true,
     frame:true,
@@ -36,116 +36,266 @@ Ext.define('saas.view.sys.config.FormPanel', {
     },
     },
 
 
     items: [{
     items: [{
-        bind:'{companyId}',
+        bind:'{id}',
         xtype: 'hidden',
         xtype: 'hidden',
-        name: 'companyId',
+        name: 'id',
         fieldLabel: 'id',
         fieldLabel: 'id',
         allowBlank: true,
         allowBlank: true,
         width:600
         width:600
     },{
     },{
-        bind:'{en_name}',
+        bind:'{name}',
         xtype: 'textfield',
         xtype: 'textfield',
-        name: 'en_name',
+        name: 'name',
         fieldLabel: '公司名称',
         fieldLabel: '公司名称',
         allowBlank: true,
         allowBlank: true,
         editable:false,
         editable:false,
         readOnly:true,
         readOnly:true,
         width:600
         width:600
     },{
     },{
-        bind:'{en_address}',
+        bind:'{address}',
         xtype: 'textfield',
         xtype: 'textfield',
-        name: 'en_address',
+        name: 'address',
         fieldLabel: '公司地址',
         fieldLabel: '公司地址',
         beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
         beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
         allowBlank: false,
         allowBlank: false,
         width:600
         width:600
     },{
     },{
-        bind:'{en_tel}',
+        bind:'{tel}',
         xtype: 'textfield',
         xtype: 'textfield',
-        name: 'en_tel',
+        name: 'tel',
         fieldLabel: '电话',
         fieldLabel: '电话',
         beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
         beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
         allowBlank: false,
         allowBlank: false,
         width:500
         width:500
     },{
     },{
-        bind:'{en_fax}',
+        bind:'{fax}',
         xtype: 'textfield',
         xtype: 'textfield',
-        name: 'en_fax',
+        name: 'fax',
         fieldLabel: '传真',
         fieldLabel: '传真',
         allowBlank: true,
         allowBlank: true,
         width:500
         width:500
-    },{
-        bind:'{en_begindate}',
-        xtype : "datefield", 
-        name : "en_begindate",
-        format:'Y-m-d H:i:s', 
-        fieldLabel : "开账日期", 
-        allowBlank : true, 
-        editable:false,
-        hideTrigger:true,
-        readOnly:true,
-        width:500
-    },{ 
-        bind:'{en_pricemethod}',
-        displayField : "display", 
-        editable:false,
-        hideTrigger : false, 
-        maxLength : 100.0, 
-        width:500,
-        minValue : null, 
-        queryMode : "local", 
-        valueField : "value", 
-        xtype : "combo",
-        value:'WACC',
-        store:{
-            fields: ['display', 'value'],
-            data : [
-                {"display":"加权平均法", "value":'WACC'},
-                {"display":"先进先出法", "value":'FIFO'}
-            ]
-        },
-        name : "en_pricemethod", 
-        beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
-        fieldLabel : "库存计算方式", 
-        allowBlank : false, 
-    },{  
-        bind:'{en_signet}',
-        name : "en_signet", 
-        fieldLabel : "打印章上传", 
-        allowBlank : false, 
-        width:500,
-        xtype: 'filefield',
-        beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
-        emptyText: '请选择图片',
-        buttonText: '',
-        buttonConfig: {
+    }
+    // ,{
+    //     bind:'{en_begindate}',
+    //     xtype : "datefield", 
+    //     name : "en_begindate",
+    //     format:'Y-m-d H:i:s', 
+    //     fieldLabel : "开账日期", 
+    //     allowBlank : true, 
+    //     editable:false,
+    //     hideTrigger:true,
+    //     readOnly:true,
+    //     width:500
+    // }
+    // ,{ 
+    //     bind:'{en_pricemethod}',
+    //     displayField : "display", 
+    //     editable:false,
+    //     hideTrigger : false, 
+    //     maxLength : 100.0, 
+    //     width:500,
+    //     minValue : null, 
+    //     queryMode : "local", 
+    //     valueField : "value", 
+    //     xtype : "combo",
+    //     value:'WACC',
+    //     store:{
+    //         fields: ['display', 'value'],
+    //         data : [
+    //             {"display":"加权平均法", "value":'WACC'},
+    //             {"display":"先进先出法", "value":'FIFO'}
+    //         ]
+    //     },
+    //     name : "en_pricemethod", 
+    //     beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
+    //     fieldLabel : "库存计算方式", 
+    //     allowBlank : false, 
+    // }
+    // ,{  
+    //     ignore:true,
+    //     bind:'{updateTime}',
+    //     xtype : "datefield", 
+    //     name : "updateTime", 
+    //     fieldLabel : "更新时间", 
+    //     allowBlank : true, 
+    //     hideTrigger:true,
+    //     format:'Y-m-d H:i:s',
+    //     editable:false,
+    //     readOnly:true,
+    //     width:500,
+    // }
+    ,{
+        xtype: 'form',
+		width:600,
+		frame: false,
+		border: false,
+		minHeight: 22,
+		bodyStyle: 'padding:2px;',
+        layout: 'hbox',
+        items:[{
+            bind:'{signet}',
+            name : "signet", 
+            allowBlank : true, 
+            hidden:true,
+            xtype:'numberfield'
+        },{
+            allowBlank : true, 
+            width:500,
+            fieldLabel:'打印章上传',
+            xtype: 'filefield',
+            emptyText: '请选择图片',
+            buttonText: '',
+            buttonConfig: {
+                iconCls: 'x-fa fa-picture-o',
+            },
+            createFileInput : function() {
+                    var me = this;
+                    me.fileInputEl = me.button.el.createChild({
+                    name: me.getName(),
+                    cls: Ext.baseCSSPrefix + 'form-file-input',
+                    tag: 'input',
+                    type: 'file',
+                    size: 1,
+                    accept:"image/*"
+                }).on('change', me.onFileChange, me);
+            },
+            listeners: {
+                afterrender:function(field,ops){
+                    var fileEl = field.fileInputEl.dom;
+                    fileEl.setAttribute("accept","image/*");
+                },
+                change: function(field){
+                    var form = field.ownerCt.ownerCt;
+                    var myForm = field.ownerCt;
+                    var fileEl = field.fileInputEl.dom;
+                    var fd = new FormData();
+                    fd.append('file', fileEl.files[0]);
+                    form.setLoading(true);
+                    Ext.Ajax.request({
+                        url: 'http://192.168.253.31:8560/api/file/upload',//这里是填写需要跨域访问的URL
+                        cors: true,
+                        useDefaultXhrHeader: false,
+                        method: 'post',
+                        rawData: fd,
+                        headers: {
+                            'Access-Control-Allow-Origin': '*',
+                            'Authorization':  saas.util.State.get('session').token,
+                            //"Content-Type": 'multipart/form-data'  //文件上传的格式, 
+                            "Content-Type":null
+                        },
+                        success: function (response, opts) {
+                            form.setLoading(false);
+                            showToast('上传成功');
+                            var res = Ext.decode(response.responseText);
+                            if(res.success){
+                                var data = res.data;
+                                var name = data.name + "  (" + Ext.util.Format.fileSize(data.size) + ")";
+                                myForm.down('[name=signet]').setValue(data.id);
+                                field.setRawValue(name);
+                            }else{
+                                showToast('上传失败: ' + res.message);
+                            }
+                        },
+                        failure: function (response, opts) {
+                            form.setLoading(false);
+                            var res = Ext.decode(response.responseText);
+                            showToast('上传失败: ' + res.message);
+                        }
+                    });
+                }
+            }
+        },{
+            hidden:true,
+            name:'showSignetPhoto',
+            xtype:'button',
             iconCls: 'x-fa fa-picture-o'
             iconCls: 'x-fa fa-picture-o'
-        }
-    },{  
-        bind:'{en_logo}',
-        name : "en_logo", 
-        fieldLabel : "Logo上传", 
-        allowBlank : false, 
-        width:500,
-        xtype: 'filefield',
-        beforeLabelTextTpl : "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
-        emptyText: '请选择图片',
-        buttonText: '',
-        buttonConfig: {
+        }]
+    },{
+        xtype: 'form',
+		width:600,
+		frame: false,
+		border: false,
+		minHeight: 22,
+		bodyStyle: 'padding:2px;',
+        layout: 'hbox',
+        items:[{
+            bind:'{logoUrl}',
+            name : "logoUrl", 
+            allowBlank : true, 
+            hidden:true,
+            xtype:'numberfield'
+        },{
+            allowBlank : true, 
+            width:500,
+            fieldLabel:'Logo上传',
+            xtype: 'filefield',
+            emptyText: '请选择图片',
+            buttonText: '',
+            buttonConfig: {
+                iconCls: 'x-fa fa-picture-o',
+            },
+            createFileInput : function() {
+                    var me = this;
+                    me.fileInputEl = me.button.el.createChild({
+                    name: me.getName(),
+                    cls: Ext.baseCSSPrefix + 'form-file-input',
+                    tag: 'input',
+                    type: 'file',
+                    size: 1,
+                    accept:"image/*"
+                }).on('change', me.onFileChange, me);
+            },
+            listeners: {
+                afterrender:function(field,ops){
+                    var fileEl = field.fileInputEl.dom;
+                    fileEl.setAttribute("accept","image/*");
+                },
+                change: function(field){
+                    var form = field.ownerCt.ownerCt;
+                    var myForm = field.ownerCt;
+                    var fileEl = field.fileInputEl.dom;
+                    var fd = new FormData();
+                    fd.append('file', fileEl.files[0]);
+                    form.setLoading(true);
+                    Ext.Ajax.request({
+                        url: 'http://192.168.253.31:8560/api/file/upload',//这里是填写需要跨域访问的URL
+                        cors: true,
+                        useDefaultXhrHeader: false,
+                        method: 'post',
+                        rawData: fd,
+                        headers: {
+                            'Access-Control-Allow-Origin': '*',
+                            'Authorization':  saas.util.State.get('session').token,
+                            //"Content-Type": 'multipart/form-data'  //文件上传的格式, 
+                            "Content-Type":null
+                        },
+                        success: function (response, opts) {
+                            form.setLoading(false);
+                            showToast('上传成功');
+                            var res = Ext.decode(response.responseText);
+                            if(res.success){
+                                var data = res.data;
+                                var name = data.name + "  (" + Ext.util.Format.fileSize(data.size) + ")";
+                                myForm.down('[name=logoUrl]').setValue(data.id);
+                                field.setRawValue(name);
+                            }else{
+                                showToast('上传失败: ' + res.message);
+                            }
+                        },
+                        failure: function (response, opts) {
+                            form.setLoading(false);
+                            var res = Ext.decode(response.responseText);
+                            showToast('上传失败: ' + res.message);
+                        }
+                    });
+                }
+            }
+        },{
+            hidden:true,
+            name:'showLogoPhoto',
+            xtype:'button',
             iconCls: 'x-fa fa-picture-o'
             iconCls: 'x-fa fa-picture-o'
-        }
-    },{  
-        ignore:true,
-        bind:'{updateTime}',
-        xtype : "datefield", 
-        name : "updateTime", 
-        fieldLabel : "更新时间", 
-        allowBlank : true, 
-        hideTrigger:true,
-        format:'Y-m-d H:i:s',
-        editable:false,
-        readOnly:true,
-        width:500,
+        }]
     }],
     }],
 
 
     initComponent: function () {
     initComponent: function () {

+ 5 - 0
frontend/saas-web/app/view/sys/manager/FormPanel.js

@@ -38,6 +38,11 @@ Ext.define('saas.view.sys.manager.FormPanel', {
         iconCls:'x-fa fa-user-circle-o',
         iconCls:'x-fa fa-user-circle-o',
         title: '权限设置',
         title: '权限设置',
         xtype:'sys-power-formpanel'
         xtype:'sys-power-formpanel'
+    },{
+        cls:'sys-config-formpanel',
+        iconCls:'x-fa fa-cog',
+        title: '参数设置',
+        xtype:'sys-baseconfig-formpanel'
     }],
     }],
 
 
     initComponent: function () {
     initComponent: function () {