Browse Source

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

hy 7 years ago
parent
commit
246b4faa18
70 changed files with 1262 additions and 418 deletions
  1. 2 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 16 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/CommonController.java
  3. 6 6
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendor.java
  4. 1 1
      applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml
  5. 1 1
      applications/document/document-server/src/main/resources/mapper/VendorMapper.xml
  6. 4 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/PaybalanceController.java
  7. 4 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/RecbalanceContorller.java
  8. 1 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/BanksubledgerMapper.java
  9. 16 12
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  10. 7 6
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  11. 1 1
      applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml
  12. 1 1
      applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml
  13. 1 1
      applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml
  14. 1 1
      applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml
  15. 2 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutDTO.java
  16. 2 0
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutListDTO.java
  17. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseMapper.java
  18. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOut.java
  19. 32 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java
  20. 1 6
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  21. 5 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  22. 29 1
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml
  23. 39 5
      applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml
  24. 5 0
      applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml
  25. 30 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java
  26. 1 1
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java
  27. 2 2
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/ProdInOutServiceImpl.java
  28. 29 1
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml
  29. 39 6
      applications/storage/storage-server/src/main/resources/mapper/ProdInOutMapper.xml
  30. 44 0
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/PowerSetDTO.java
  31. 25 0
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/PowerSetListDTO.java
  32. 13 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/RoleController.java
  33. 9 3
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/RoleResourceMapper.java
  34. 9 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/OtherPower.java
  35. 19 9
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/RoleResource.java
  36. 8 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/RoleService.java
  37. 52 9
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/RoleServiceImpl.java
  38. 13 2
      base-servers/account/account-server/src/main/resources/mapper/RoleResourceMapper.xml
  39. 89 1
      base-servers/file/file-api/src/main/java/com/usoftchina/saas/file/api/FileApi.java
  40. 3 1
      base-servers/file/file-server/src/main/java/com/usoftchina/saas/file/controller/FileController.java
  41. 16 1
      frontend/saas-web/app/Application.scss
  42. 18 9
      frontend/saas-web/app/view/core/form/FormPanel.js
  43. 35 1
      frontend/saas-web/app/view/core/form/FormPanelController.js
  44. 125 0
      frontend/saas-web/app/view/core/form/field/Month.js
  45. 6 6
      frontend/saas-web/app/view/document/customer/FormPanel.js
  46. 44 24
      frontend/saas-web/app/view/document/product/BasePanel.js
  47. 51 107
      frontend/saas-web/app/view/document/product/FormPanel.js
  48. 4 1
      frontend/saas-web/app/view/document/vendor/BasePanel.js
  49. 6 6
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  50. 1 0
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  51. 1 0
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  52. 9 5
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  53. 6 5
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  54. 5 3
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  55. 4 3
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  56. 2 2
      frontend/saas-web/app/view/money/report/AccountBalance.js
  57. 2 2
      frontend/saas-web/app/view/money/report/PayDetail.js
  58. 2 2
      frontend/saas-web/app/view/money/report/RecDetail.js
  59. 2 2
      frontend/saas-web/app/view/money/report/VendorCheck.js
  60. 46 11
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  61. 35 21
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  62. 34 24
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  63. 1 1
      frontend/saas-web/app/view/stock/make/FormPanelController.js
  64. 0 17
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  65. 40 30
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  66. 80 2
      frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js
  67. 0 17
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  68. 40 32
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js
  69. 80 2
      frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js
  70. 1 4
      frontend/saas-web/app/view/stock/report/ProdinoutCount.js

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

@@ -38,6 +38,8 @@ public enum BizExceptionCode implements BaseExceptionCode {
 
     //采购 70000-71999
     PURCCHECKIN_POST_ERROR(70000,""),
+    PURCHASE_UNAUDIT_ERROR(72006,"采购订单已转采购验收单,无法反审核"),
+
 
     //销售
     SALE_ALL_TURNOUT(72000, "该销售单已全部转出货,无法转出货单"),

+ 16 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/CommonController.java

@@ -0,0 +1,16 @@
+package com.usoftchina.saas.commons.controller;
+
+import com.usoftchina.saas.base.Result;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class CommonController {
+
+    @RequestMapping("/{caller}/export")
+    public Result export(@PathVariable("caller") String caller){
+        return Result.success();
+    }
+
+}

+ 6 - 6
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendor.java

@@ -35,11 +35,11 @@ public class Vendor extends CommonBaseEntity implements Serializable{
     /**
      * 期初应付
      */
-    private double ve_beginapamount;
+    private Double ve_beginapamount;
     /**
      * 期初预付
      */
-    private double ve_beginprepayamount;
+    private Double ve_beginprepayamount;
     /**
      * 承付天数
      */
@@ -173,19 +173,19 @@ public class Vendor extends CommonBaseEntity implements Serializable{
         this.ve_begindate = ve_begindate;
     }
 
-    public double getVe_beginapamount() {
+    public Double getVe_beginapamount() {
         return ve_beginapamount;
     }
 
-    public void setVe_beginapamount(double ve_beginapamount) {
+    public void setVe_beginapamount(Double ve_beginapamount) {
         this.ve_beginapamount = ve_beginapamount;
     }
 
-    public double getVe_beginprepayamount() {
+    public Double getVe_beginprepayamount() {
         return ve_beginprepayamount;
     }
 
-    public void setVe_beginprepayamount(double ve_beginprepayamount) {
+    public void setVe_beginprepayamount(Double ve_beginprepayamount) {
         this.ve_beginprepayamount = ve_beginprepayamount;
     }
 

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

@@ -130,7 +130,7 @@
   </select>
 
   <select id="getCombo" resultType="com.usoftchina.saas.commons.dto.ComboDTO">
-    SELECT PB_NAME display,PB_NAME value FROM PRODUCTBRAND
+    SELECT PB_NAME display,PB_NAME value FROM PRODUCTBRAND WHERE COMPANYID=#{companyId}
   </select>
   <select id="selectCountByName" resultType="int">
     SELECT COUNT(*) FROM PRODUCTBRAND

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

@@ -101,7 +101,7 @@
             </if>
             AND VENDOR.COMPANYID = #{companyId}
         </where>
-        order by VE_ID,VC_DETNO DESC
+        order by VE_ID DESC
     </select>
 
     <sql id="Base_Column_List" >

+ 4 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/PaybalanceController.java

@@ -10,6 +10,7 @@ import com.usoftchina.saas.money.po.Paybalance;
 import com.usoftchina.saas.money.service.PaybalanceService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 /**
@@ -22,6 +23,7 @@ public class PaybalanceController {
     @Autowired
     private PaybalanceService paybalanceService;
 
+    @Transactional
     @RequestMapping("/save")
     public Result saveFormData(@RequestBody Pay body) {
         DocBaseDTO docBaseDTO = paybalanceService.insert(body);
@@ -58,12 +60,14 @@ public class PaybalanceController {
         return Result.success(list);
     }
 
+    @Transactional
     @RequestMapping("/audit")
     public Result audit(@RequestBody Pay body){
         paybalanceService.audit(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/unAudit/{id}")
     public Result unAudit(@PathVariable("id") int id){
         paybalanceService.unAudit(id);

+ 4 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/RecbalanceContorller.java

@@ -10,6 +10,7 @@ import com.usoftchina.saas.money.po.Recbalance;
 import com.usoftchina.saas.money.service.RecbalanceService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Iterator;
@@ -24,6 +25,7 @@ public class RecbalanceContorller {
     @Autowired
     private RecbalanceService recbalanceService;
 
+    @Transactional
     @RequestMapping("/save")
     public Result saveFormData(@RequestBody Rec body){
         DocBaseDTO docBaseDTO = recbalanceService.insert(body);
@@ -58,12 +60,14 @@ public class RecbalanceContorller {
         return Result.success(recbalanceService.selectList(page, condition));
     }
 
+    @Transactional
     @RequestMapping("/audit")
     public Result audit(@RequestBody Rec body){
         recbalanceService.audit(body);
         return Result.success();
     }
 
+    @Transactional
     @PostMapping("/unAudit/{id}")
     public Result unAudit(@PathVariable("id") Long id){
         recbalanceService.unAudit(id);

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

@@ -22,7 +22,7 @@ public interface BanksubledgerMapper extends CommonBaseMapper<Banksubledger> {
 //    Long insert(Banksubledger record);
 
     int insertSelective(Banksubledger record);
-    String selectCode(String code);
+    List<String> selectCode(String code);
 
     List<Banksubledger> selectByExample(BanksubledgerExample example);
 

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

@@ -192,7 +192,8 @@ public class PaybalanceServiceImpl implements PaybalanceService {
             //更新账户资料金额
             Bankinformation bankinformation = new Bankinformation();
             Bankinformation nowBankInformation = paybalanceMapper.selectBankInformationByPrimaryKey(det.getPd_bankid());
-            bankinformation.setBk_thisamount(nowBankInformation.getBk_thisamount()+det.getPd_amount());
+            bankinformation.setBk_thisamount((nowBankInformation.getBk_thisamount() == null ? new Double(0) : nowBankInformation.getBk_thisamount())
+                    + (det.getPd_amount() == null ? 0.0 : det.getPd_amount()));
             paybalanceMapper.updateBankByPrimaryKeySelective(bankinformation);
         }
         //更新主表pb_pbdamount=从表二金额合计
@@ -240,18 +241,18 @@ public class PaybalanceServiceImpl implements PaybalanceService {
          * ve_leftamount=ve_beginapamount-ve_beginprepayamount+ve_payamount-ve_preamount;
          */
         Paybalance pay = paybalanceMapper.selectByPrimaryKey(Long.valueOf(id));
-        Double pay_preamount = pay.getPb_preamount();
-        Double pay_pbdamount = pay.getPb_pbdamount();
+        Double pay_preamount = pay.getPb_preamount() == null ? new Double(0): pay.getPb_preamount();
+        Double pay_pbdamount = pay.getPb_pbdamount() == null ? new Double(0): pay.getPb_pbdamount();
         Vendor vendorData = paybalanceMapper.selectVendorByPrimaryKey(pay.getPb_vendid());
-        Double preamount = vendorData.getVe_preamount();
-        Double beginapamount = vendorData.getVe_beginapamount();
-        Double beginprepayamount= vendorData.getVe_beginprepayamount();
-        Double payamount = vendorData.getVe_payamount();
+        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(String.valueOf(pay.getPb_vendid())));
-        vendor.setVe_preamount(preamount-pay_preamount);
-        vendor.setVe_payamount(payamount+pay_pbdamount);
-        vendor.setVe_leftamount(beginapamount-beginprepayamount+payamount+pay_pbdamount-preamount+pay_preamount);
+        vendor.setVe_preamount(preamount - pay_preamount);
+        vendor.setVe_payamount(payamount + pay_pbdamount);
+        vendor.setVe_leftamount(beginapamount - beginprepayamount + payamount + pay_pbdamount - preamount + pay_preamount);
         paybalanceMapper.updateVendorByPrimaryKeySelective(vendor);
 
         //更新账户资料金额
@@ -259,7 +260,8 @@ public class PaybalanceServiceImpl implements PaybalanceService {
         for (Paybalancedet det:paybalancedet) {
             Bankinformation bankinformation = new Bankinformation();
             Bankinformation nowBankInformation = paybalanceMapper.selectBankInformationByPrimaryKey(det.getPd_bankid());
-            bankinformation.setBk_thisamount(nowBankInformation.getBk_thisamount()-det.getPd_amount());
+            bankinformation.setBk_thisamount((nowBankInformation.getBk_thisamount() == null ? new Double(0) : nowBankInformation.getBk_thisamount())
+                    - (det.getPd_amount() == null ? new Double(0) : det.getPd_amount()));
             paybalanceMapper.updateBankByPrimaryKeySelective(bankinformation);
         }
 
@@ -460,7 +462,9 @@ public class PaybalanceServiceImpl implements PaybalanceService {
             banksubledger.setBl_manname(paybalance.getPb_manname());
             banksubledger.setBl_remark(paybalancedet.getPd_remark());
             banksubledger.setBl_orderamount(paybalancedet.getPd_amount() * -1);
-            if (banksubledgerMapper.selectCode(banksubledger.getBl_code()) == null){
+
+            List<String> bankList = banksubledgerMapper.selectCode(banksubledger.getBl_code());
+            if (bankList.size() == 0){
                 banksubledgerMapper.insertSelective(banksubledger);
             }else {
                 banksubledgerMapper.updateByPrimaryKeySelective(banksubledger);

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

@@ -244,9 +244,9 @@ public class RecbalanceServiceImpl implements RecbalanceService {
 
         Customer customer = new Customer();
         customer.setId(Long.valueOf(String.valueOf(recbalance.getRb_custid())));
-        customer.setCu_preamount(preamount+amountTotal);
-        customer.setCu_recamount(recamount-amountTotal2);
-        customer.setCu_leftamount(beginapamount-beginprepayamount+recamount-amountTotal2-preamount-amountTotal);
+        customer.setCu_preamount(preamount + amountTotal);
+        customer.setCu_recamount(recamount - amountTotal2);
+        customer.setCu_leftamount(beginapamount - beginprepayamount + recamount - amountTotal2 - preamount - amountTotal);
         recbalanceMapper.updateCustomerByPrimaryKeySelective(customer);
 
         //更新本次核销金额
@@ -276,8 +276,8 @@ public class RecbalanceServiceImpl implements RecbalanceService {
         Double recamount = customerData.getCu_recamount()==null?new Double(0):customerData.getCu_recamount();
         Customer customer = new Customer();
         customer.setId(Long.valueOf(String.valueOf(rec.getRb_custid())));
-        customer.setCu_preamount(preamount-pay_preamount);
-        customer.setCu_recamount(recamount+pay_pbdamount);
+        customer.setCu_preamount(preamount - pay_preamount);
+        customer.setCu_recamount(recamount + pay_pbdamount);
         customer.setCu_leftamount(beginapamount-beginprepayamount+recamount+pay_pbdamount-preamount+pay_preamount);
         recbalanceMapper.updateCustomerByPrimaryKeySelective(customer);
 
@@ -286,7 +286,8 @@ public class RecbalanceServiceImpl implements RecbalanceService {
         for (Recbalancedet det:recbalancedet) {
             Bankinformation bankinformation = new Bankinformation();
             Bankinformation nowBankInformation = recbalanceMapper.selectBankInformationByPrimaryKey(det.getRd_bankid());
-            bankinformation.setBk_thisamount(nowBankInformation.getBk_thisamount()-det.getRd_amount());
+            bankinformation.setBk_thisamount((nowBankInformation.getBk_thisamount() == null ? new Double(0) : nowBankInformation.getBk_thisamount()) -
+                    (det.getRd_amount() == null ? new Double(0) : det.getRd_amount()));
             recbalanceMapper.updateBankByPrimaryKeySelective(bankinformation);
         }
 

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

@@ -32,7 +32,7 @@
     select 
     <include refid="Base_Column_List" />
     from paybalancedet
-    where pd_pbid = #{id,jdbcType=INTEGER}
+    where pd_pbid = #{id,jdbcType=INTEGER} order by pd_id desc
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from paybalancedet

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

@@ -32,7 +32,7 @@
     select
     <include refid="Base_Column_List" />
     from paybalancedetail
-    where pbd_pbid = #{id,jdbcType=INTEGER}
+    where pbd_pbid = #{id,jdbcType=INTEGER} order by pbd_sldate desc
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from paybalancedetail

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

@@ -90,7 +90,7 @@
     select 
     <include refid="Base_Column_List" />
     from recbalancedet
-    where rd_rbid = #{id,jdbcType=INTEGER}
+    where rd_rbid = #{id,jdbcType=INTEGER} order by rd_id desc
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer">
     delete from recbalancedet

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

@@ -36,7 +36,7 @@
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from recbalancedetail
-    where rbd_id = #{id,jdbcType=INTEGER}
+    where rbd_id = #{id,jdbcType=INTEGER} order by rbd_sldate desc
   </delete>
 
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >

+ 2 - 0
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutDTO.java

@@ -71,4 +71,6 @@ public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
 
     private String pi_auditman;
 
+    private String pi_remark;
+
 }

+ 2 - 0
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdInOutListDTO.java

@@ -71,6 +71,8 @@ public class ProdInOutListDTO extends CommonBaseDTO implements Serializable {
 
     private String pi_auditman;
 
+    private String pi_remark;
+
     private Long pd_piid;
 
     private String pd_inoutno;

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

@@ -26,4 +26,6 @@ public interface PurchaseMapper extends CommonBaseMapper<Purchase>{
                                    @Param("companyId") Long companyId);
 
     String selectCodeById(Long id);
+
+    Integer checkTurnInstatus(Long id);
 }

+ 2 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOut.java

@@ -66,4 +66,6 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private String pi_auditman;
 
+    private String pi_remark;
+
 }

+ 32 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdInOutList.java

@@ -70,6 +70,8 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private String pi_auditman;
 
+    private String pi_remark;
+
     private Long pd_piid;
 
     private String pd_inoutno;
@@ -142,4 +144,34 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Long pd_ioid;
 
+    //private ProductDTO productDTO;
+    private Long pr_id;
+    private String pr_code;
+    private String pr_detail;
+    private String pr_spec;
+    private String pr_unit;
+    private String pr_kind;
+    private String pr_orispeccode;
+    private long pr_whid;
+    private String pr_whcode;
+    private String pr_whname;
+    private long pr_zxbzs;
+    private long pr_leadtime;
+    private String pr_brand;
+    private String pr_standardprice;
+    private String pr_purcprice;
+    private String pr_saleprice;
+    private long pr_vendid;
+    private String pr_vendname;
+    private String pr_vendcode;
+    private Date pr_docdate;
+    private long pr_recordmanid;
+    private String pr_recordman;
+    private String pr_status;
+    private String pr_statuscode;
+    private String pr_text1;
+    private String pr_text2;
+    private String pr_text3;
+    private String pr_text4;
+
 }

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

@@ -378,12 +378,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
 
     private void checkUpdateQty(String pu_code, String pi_class) {
         int count = 0;
-        if ("采购验收单".equals(pi_class)) {
-            count = getMapper().checkQtyFromPurchase(pu_code);
-            if (count>0){
-                throw new BizException(500, "明细行数量超过来源采购单明细行数量");
-            }
-        } else if ("采购验退单".equals(pi_class)) {
+        if ("采购验退单".equals(pi_class)) {
             count = getMapper().checkQtyFromProdIn(pu_code);
             if (count>0){
                 throw new BizException(500, "明细行数量超过来源采购验收单明细行数量");

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

@@ -498,6 +498,11 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     @Transactional
     private void singleUnAudit(Long id) {
         Purchase purchase = new Purchase();
+        //检查是否已转验收单
+        Integer num = getMapper().checkTurnInstatus(id);
+        if (num > 0) {
+            throw new BizException(BizExceptionCode.PURCHASE_UNAUDIT_ERROR);
+        }
         //生成更新对象
         purchase.setId(id);
         purchase.setPu_status(Status.UNAUDITED.getDisplay());

+ 29 - 1
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -32,6 +32,7 @@
     <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
     <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
+    <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
     <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
     <result column="pd_inoutno" jdbcType="VARCHAR" property="pd_inoutno" />
     <result column="pd_piclass" jdbcType="VARCHAR" property="pd_piclass" />
@@ -70,7 +71,34 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
-
+    <result column="pr_id" property="pr_id"/>
+    <result column="pr_code" property="pr_code"/>
+    <result column="pr_detail" property="pr_detail"/>
+    <result column="pr_spec" property="pr_spec"/>
+    <result column="pr_unit" property="pr_unit"/>
+    <result column="pr_kind" property="pr_kind"/>
+    <result column="pr_orispeccode" property="pr_orispeccode"/>
+    <result column="pr_whid" property="pr_whid"/>
+    <result column="pr_whcode" property="pr_whcode"/>
+    <result column="pr_whname" property="pr_whname"/>
+    <result column="pr_zxbzs" property="pr_zxbzs"/>
+    <result column="pr_leadtime" property="pr_leadtime"/>
+    <result column="pr_brand" property="pr_brand"/>
+    <result column="pr_standardprice" property="pr_standardprice"/>
+    <result column="pr_purcprice" property="pr_purcprice"/>
+    <result column="pr_saleprice" property="pr_saleprice"/>
+    <result column="pr_vendid" property="pr_vendid"/>
+    <result column="pr_vendname" property="pr_vendname"/>
+    <result column="pr_vendcode" property="pr_vendcode"/>
+    <result column="pr_docdate" property="pr_docdate"/>
+    <result column="pr_recordmanid" property="pr_recordmanid"/>
+    <result column="pr_recordman" property="pr_recordman"/>
+    <result column="pr_status" property="pr_status"/>
+    <result column="pr_statuscode" property="pr_statuscode"/>
+    <result column="pr_text1" property="pr_text1"/>
+    <result column="pr_text2" property="pr_text2"/>
+    <result column="pr_text3" property="pr_text3"/>
+    <result column="pr_text4" property="pr_text4"/>
   </resultMap>
 
   <select id="selectProdInOutBycondition"  resultMap="BaseResultMap">

+ 39 - 5
applications/purchase/purchase-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -34,6 +34,7 @@
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
     <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
+    <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
 
 
   </resultMap>
@@ -47,7 +48,8 @@
     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_recordman, pi_recorddate, pi_status, pi_statuscode, pi_printstatus, pi_printstatuscode, 
-    companyid, updaterid, updatetime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5
+    companyid, updaterid, updatetime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5,pi_auditdate,
+    pi_auditman,pi_remark
   </sql>
   <sql id="Blob_Column_List">
     pi_address
@@ -162,6 +164,15 @@
       <if test="pi_address != null">
         pi_address,
       </if>
+      <if test="pi_auditdate != null">
+        pi_auditdate,
+      </if>
+      <if test="pi_auditman != null">
+        pi_auditman,
+      </if>
+      <if test="pi_remark != null">
+        pi_remark,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
 
@@ -255,6 +266,16 @@
       <if test="pi_address != null">
         #{pi_address,jdbcType=LONGVARCHAR},
       </if>
+      <if test="pi_auditdate != null">
+        #{pi_auditdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_auditman != null">
+        #{pi_auditman,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_remark != null">
+        #{pi_remark,jdbcType=VARCHAR},
+      </if>
+
     </trim>
   </insert>
 
@@ -351,7 +372,15 @@
       <if test="pi_address != null">
         pi_address = #{pi_address,jdbcType=LONGVARCHAR},
       </if>
-
+      <if test="pi_auditdate != null">
+        pi_auditdate = #{pi_auditdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_auditman != null">
+        pi_auditman = #{pi_auditman,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_remark != null">
+        pi_remark = #{pi_remark,jdbcType=VARCHAR},
+      </if>
     </set>
     where pi_id = #{id,jdbcType=INTEGER}
   </update>
@@ -386,8 +415,10 @@
       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_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>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.purchase.po.ProdInOut">
@@ -420,7 +451,10 @@
       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_text5 = #{pi_text5,jdbcType=VARCHAR},
+      pi_auditdate = #{pi_auditdate,jdbcType=TIMESTAMP},
+      pi_auditman = #{pi_auditman,jdbcType=VARCHAR},
+      pi_remark = #{pi_remark,jdbcType=VARCHAR}
     where pi_id = #{id,jdbcType=INTEGER}
   </update>
 

+ 5 - 0
applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml

@@ -422,4 +422,9 @@
   <select id="selectCodeById" resultType="string" parameterType="long">
     select pu_code from purchase where pu_id=#{id}
   </select>
+
+  <select id="checkTurnInstatus" resultType="int" >
+    select count(1) from purchasedetail where PD_PUID=#{id} and PD_YQTY !=0;
+</select>
+
 </mapper>

+ 30 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java

@@ -145,4 +145,34 @@ public class ProdInOutList extends CommonBaseEntity{
     private Double pi_nettotal;
 
     private String pi_remark;
+
+    //private ProductDTO productDTO;
+    private Long pr_id;
+    private String pr_code;
+    private String pr_detail;
+    private String pr_spec;
+    private String pr_unit;
+    private String pr_kind;
+    private String pr_orispeccode;
+    private long pr_whid;
+    private String pr_whcode;
+    private String pr_whname;
+    private long pr_zxbzs;
+    private long pr_leadtime;
+    private String pr_brand;
+    private String pr_standardprice;
+    private String pr_purcprice;
+    private String pr_saleprice;
+    private long pr_vendid;
+    private String pr_vendname;
+    private String pr_vendcode;
+    private Date pr_docdate;
+    private long pr_recordmanid;
+    private String pr_recordman;
+    private String pr_status;
+    private String pr_statuscode;
+    private String pr_text1;
+    private String pr_text2;
+    private String pr_text3;
+    private String pr_text4;
 }

+ 1 - 1
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java

@@ -432,7 +432,7 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
             prodIODetail.setPd_ordercode(make.getMa_code());    //订单号
             prodIODetail.setPd_orderdetno(1);  //订单序号
             prodIODetail.setPd_prodid(make.getMa_prodid());    //物料ID
-            prodIODetail.setPd_prodcode(make.getMa_code()); //物料CODE
+            prodIODetail.setPd_prodcode(make.getMa_prodcode()); //物料CODE
             prodIODetail.setPd_outqty(make.getMa_qty());        //出库数
             prodIODetail.setPd_price(make.getMa_price());       //成本单价 ???
             prodIODetail.setPd_total(make.getMa_total());      //金额

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

@@ -77,9 +77,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             con = "1=1";
         }
         if (null == req || StringUtils.isEmpty(req.getMode()) || "MAIN".equals(req.getMode())) {
-            list = prodInOutListMapper.selectProdInOutListByCondition(con,companyId);
-        } else {
             list = prodInOutListMapper.selectProdInOutBycondition(con,companyId);
+        } else {
+            list = prodInOutListMapper.selectProdInOutListByCondition(con,companyId);
         }
         return list;
     }

+ 29 - 1
applications/storage/storage-server/src/main/resources/mapper/ProdInOutListMapper.xml

@@ -73,12 +73,40 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
-
+    <result column="pr_id" property="pr_id"/>
+    <result column="pr_code" property="pr_code"/>
+    <result column="pr_detail" property="pr_detail"/>
+    <result column="pr_spec" property="pr_spec"/>
+    <result column="pr_unit" property="pr_unit"/>
+    <result column="pr_kind" property="pr_kind"/>
+    <result column="pr_orispeccode" property="pr_orispeccode"/>
+    <result column="pr_whid" property="pr_whid"/>
+    <result column="pr_whcode" property="pr_whcode"/>
+    <result column="pr_whname" property="pr_whname"/>
+    <result column="pr_zxbzs" property="pr_zxbzs"/>
+    <result column="pr_leadtime" property="pr_leadtime"/>
+    <result column="pr_brand" property="pr_brand"/>
+    <result column="pr_standardprice" property="pr_standardprice"/>
+    <result column="pr_purcprice" property="pr_purcprice"/>
+    <result column="pr_saleprice" property="pr_saleprice"/>
+    <result column="pr_vendid" property="pr_vendid"/>
+    <result column="pr_vendname" property="pr_vendname"/>
+    <result column="pr_vendcode" property="pr_vendcode"/>
+    <result column="pr_docdate" property="pr_docdate"/>
+    <result column="pr_recordmanid" property="pr_recordmanid"/>
+    <result column="pr_recordman" property="pr_recordman"/>
+    <result column="pr_status" property="pr_status"/>
+    <result column="pr_statuscode" property="pr_statuscode"/>
+    <result column="pr_text1" property="pr_text1"/>
+    <result column="pr_text2" property="pr_text2"/>
+    <result column="pr_text3" property="pr_text3"/>
+    <result column="pr_text4" property="pr_text4"/>
   </resultMap>
 
 
   <select id="selectProdInOutListByCondition"  resultMap="BaseResultMap">
     select  *  from prodinout left join prodiodetail on pi_id = pd_piid
+    left join product on pd_prodcode=pr_code
     <where>
       <if test="con != null">
         ${con}

+ 39 - 6
applications/storage/storage-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -34,7 +34,7 @@
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
     <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
-
+    <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
 
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdInOut">
@@ -47,7 +47,8 @@
     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_recordman, pi_recorddate, pi_status, pi_statuscode, pi_printstatus, pi_printstatuscode, 
-    companyid, updaterid, updatetime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5
+    companyid, updaterid, updatetime, pi_text1, pi_text2, pi_text3, pi_text4, pi_text5,pi_auditdate,
+    pi_auditman,pi_remark
   </sql>
   <sql id="Blob_Column_List">
     pi_address
@@ -162,6 +163,15 @@
       <if test="pi_address != null">
         pi_address,
       </if>
+      <if test="pi_auditdate != null">
+        pi_auditdate,
+      </if>
+      <if test="pi_auditman != null">
+        pi_auditman,
+      </if>
+      <if test="pi_remark != null">
+        pi_remark,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
 
@@ -255,6 +265,15 @@
       <if test="pi_address != null">
         #{pi_address,jdbcType=LONGVARCHAR},
       </if>
+      <if test="pi_auditdate != null">
+        #{pi_auditdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_auditman != null">
+        #{pi_auditman,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_remark != null">
+        #{pi_remark,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
 
@@ -351,7 +370,15 @@
       <if test="pi_address != null">
         pi_address = #{pi_address,jdbcType=LONGVARCHAR},
       </if>
-
+      <if test="pi_auditdate != null">
+        pi_auditdate = #{pi_auditdate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pi_auditman != null">
+        pi_auditman = #{pi_auditman,jdbcType=VARCHAR},
+      </if>
+      <if test="pi_remark != null">
+        pi_remark = #{pi_remark,jdbcType=VARCHAR},
+      </if>
     </set>
     where pi_id = #{id,jdbcType=INTEGER}
   </update>
@@ -386,8 +413,10 @@
       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_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>
   <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.storage.po.ProdInOut">
@@ -420,7 +449,11 @@
       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_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 = #{id,jdbcType=INTEGER}
   </update>
 

+ 44 - 0
base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/PowerSetDTO.java

@@ -0,0 +1,44 @@
+package com.usoftchina.saas.account.dto;
+
+import java.io.Serializable;
+
+public class PowerSetDTO implements Serializable {
+
+    private Long groupId;
+    private String classify;
+    private Long resourceId;
+    private boolean checked;
+
+    public Long getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(Long groupId) {
+        this.groupId = groupId;
+    }
+
+    public String getClassify() {
+        return classify;
+    }
+
+    public void setClassify(String classify) {
+        this.classify = classify;
+    }
+
+    public Long getResourceId() {
+        return resourceId;
+    }
+
+    public void setResourceId(Long resourceId) {
+        this.resourceId = resourceId;
+    }
+
+    public boolean isChecked() {
+        return checked;
+    }
+
+    public void setChecked(boolean checked) {
+        this.checked = checked;
+    }
+
+}

+ 25 - 0
base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/PowerSetListDTO.java

@@ -0,0 +1,25 @@
+package com.usoftchina.saas.account.dto;
+
+import java.io.Serializable;
+import java.util.List;
+
+public class PowerSetListDTO implements Serializable {
+    private Long roleId;
+    private List<PowerSetDTO> powerSetList;
+
+    public Long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(Long roleId) {
+        this.roleId = roleId;
+    }
+
+    public List<PowerSetDTO> getPowerSetList() {
+        return powerSetList;
+    }
+
+    public void setPowerSetList(List<PowerSetDTO> powerSetList) {
+        this.powerSetList = powerSetList;
+    }
+}

+ 13 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/RoleController.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.account.controller;
 
 import com.usoftchina.saas.account.cache.AccountCache;
+import com.usoftchina.saas.account.dto.PowerSetListDTO;
 import com.usoftchina.saas.account.dto.RoleDTO;
 import com.usoftchina.saas.account.dto.RoleSaveDTO;
 import com.usoftchina.saas.account.dto.RoleUpdateDTO;
@@ -116,6 +117,13 @@ public class RoleController {
         return Result.success();
     }
 
+    @PostMapping("/save/bind/resource")
+    public Result updateResource(@RequestBody PowerSetListDTO powerSetListDTO){
+        roleService.saveRoleResource(powerSetListDTO);
+        clearAccountCacheByRoleId(powerSetListDTO.getRoleId());
+        return Result.success();
+    }
+
     /**
      * 角色解除绑定资源
      *
@@ -130,6 +138,11 @@ public class RoleController {
         return Result.success();
     }
 
+    /**
+     * 获取所有资源 + 角色资源 绑定状态
+     * @param id
+     * @return
+     */
     @GetMapping("/power/resource")
     public Result getResourcePower(Long id){
         return Result.success(roleService.getResourcePowerById(id));

+ 9 - 3
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/mapper/RoleResourceMapper.java

@@ -63,9 +63,15 @@ public interface RoleResourceMapper {
     List<Map<String, Object>> selectClassifyByRoleId(@Param("id") Long id);
 
     /**
-     * 通过资源groupId和角色ID查询 角色是否具有改资源的权限
-     * @param roleId
+     * 查询其他权限
+     * @return
+     */
+    List<OtherPower> selectOthersPower();
+
+    /**
+     * 批量插入
+     * @param roleResourceList
      * @return
      */
-    List<OtherPower> selectOthersPower(@Param("roleId") Long roleId);
+    boolean batchInsert(List<RoleResource> roleResourceList);
 }

+ 9 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/OtherPower.java

@@ -8,6 +8,15 @@ public class OtherPower implements Serializable {
     private String name;
     private boolean checked;
     private Long groupId;
+    private Long roleId;
+
+    public Long getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(Long roleId) {
+        this.roleId = roleId;
+    }
 
     public Long getResourceId() {
         return resourceId;

+ 19 - 9
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/RoleResource.java

@@ -9,18 +9,18 @@ import java.io.Serializable;
  * @date 2018/10/2
  */
 public class RoleResource implements Serializable {
-    private long roleId;
+    private Long roleId;
     /**
      * 资源所属应用
      * <p>冗余字段,方便查询</p>
      */
     private String appId;
-    private long resourceId;
+    private Long resourceId;
     /**
      * 角色所属公司
      * <p>冗余字段,方便查询</p>
      */
-    private long companyId;
+    private Long companyId;
 
     public String getAppId() {
         return appId;
@@ -30,27 +30,37 @@ public class RoleResource implements Serializable {
         this.appId = appId;
     }
 
-    public long getCompanyId() {
+    public Long getCompanyId() {
         return companyId;
     }
 
-    public void setCompanyId(long companyId) {
+    public void setCompanyId(Long companyId) {
         this.companyId = companyId;
     }
 
-    public long getRoleId() {
+    public Long getRoleId() {
         return roleId;
     }
 
-    public void setRoleId(long roleId) {
+    public void setRoleId(Long roleId) {
         this.roleId = roleId;
     }
 
-    public long getResourceId() {
+    public Long getResourceId() {
         return resourceId;
     }
 
-    public void setResourceId(long resourceId) {
+    public void setResourceId(Long resourceId) {
         this.resourceId = resourceId;
     }
+
+    public RoleResource(Long roleId, String appId, Long resourceId, Long companyId) {
+        this.roleId = roleId;
+        this.appId = appId;
+        this.resourceId = resourceId;
+        this.companyId = companyId;
+    }
+
+    public RoleResource() {
+    }
 }

+ 8 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/RoleService.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.account.service;
 
 import com.usoftchina.saas.account.dto.PowerDTO;
+import com.usoftchina.saas.account.dto.PowerSetListDTO;
 import com.usoftchina.saas.account.dto.RoleBaseDTO;
 import com.usoftchina.saas.account.mapper.RoleMapper;
 import com.usoftchina.saas.account.po.Role;
@@ -44,4 +45,11 @@ public interface RoleService extends CommonBaseService<RoleMapper, Role> {
      * @return
      */
     List<PowerDTO> getResourcePowerById(Long id);
+
+    /**
+     * 保存角色权限
+     * @param powerSetListDTO
+     * @return
+     */
+    boolean saveRoleResource(PowerSetListDTO powerSetListDTO);
 }

+ 52 - 9
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/service/impl/RoleServiceImpl.java

@@ -1,9 +1,7 @@
 package com.usoftchina.saas.account.service.impl;
 
 import com.usoftchina.saas.account.constant.RoleType;
-import com.usoftchina.saas.account.dto.OtherPowerDTO;
-import com.usoftchina.saas.account.dto.PowerDTO;
-import com.usoftchina.saas.account.dto.RoleBaseDTO;
+import com.usoftchina.saas.account.dto.*;
 import com.usoftchina.saas.account.mapper.*;
 import com.usoftchina.saas.account.po.*;
 import com.usoftchina.saas.account.service.ResourceService;
@@ -94,7 +92,7 @@ public class RoleServiceImpl extends CommonBaseServiceImpl<RoleMapper, Role> imp
     public List<PowerDTO> getResourcePowerById(Long id) {
         List<PowerDTO> powerDTOList = new ArrayList<PowerDTO>();
         List<Map<String, Object>> classifyList = roleResourceMapper.selectClassifyByRoleId(id);
-        List<OtherPower> otherPowerList = roleResourceMapper.selectOthersPower(id);
+        List<OtherPower> otherPowerList = roleResourceMapper.selectOthersPower();
         //查询所有模块
         List<ResourceModule> modules = resourceModuleMapper.selectByAppId(BaseContextHolder.getAppId());
         for (ResourceModule module : modules){
@@ -110,9 +108,7 @@ public class RoleServiceImpl extends CommonBaseServiceImpl<RoleMapper, Role> imp
                     if (group.getId().equals(map.get("group_id"))){
                         String classify = String.valueOf(map.get("classify"));
                         setPowerValue(powerDTO, classify);
-                        if (classify.contains("OTHER")){
-                            setOtherPower(powerDTO, group.getId(), otherPowerList);
-                        }
+                        setOtherPower(powerDTO, group.getId(), id, otherPowerList);
                     }
                 }
                 powerDTOList.add(powerDTO);
@@ -121,10 +117,56 @@ public class RoleServiceImpl extends CommonBaseServiceImpl<RoleMapper, Role> imp
         return powerDTOList;
     }
 
-    private void setOtherPower(PowerDTO powerDTO, Long groupId, List<OtherPower> otherPowerList) {
+    @Override
+    public boolean saveRoleResource(PowerSetListDTO powerSetListDTO) {
+        Long roleId = powerSetListDTO.getRoleId();
+        Long companyId = BaseContextHolder.getCompanyId();
+        String appId = BaseContextHolder.getAppId();
+        List<RoleResource> addRoleResourceList = new ArrayList<RoleResource>();
+        List<RoleResource> delRoleResourceList = new ArrayList<RoleResource>();
+
+        for (PowerSetDTO powerSetDTO : powerSetListDTO.getPowerSetList()){
+            List<Resource> resourceList = resourceMapper.selectByGroupId(powerSetDTO.getGroupId());
+            if (powerSetDTO.isChecked()) {
+                if (powerSetDTO.getGroupId() != null && powerSetDTO.getResourceId() == null) {
+                    for (Resource resource : resourceList){
+                        if (resource.getClassify().equalsIgnoreCase(powerSetDTO.getClassify())){
+                            RoleResource roleResource = new RoleResource(roleId, appId, resource.getId(), companyId);
+                            addRoleResourceList.add(roleResource);
+                        }
+                    }
+                } else if (powerSetDTO.getResourceId() != null && powerSetDTO.getGroupId() == null) {
+                    roleResourceMapper.delete(roleId, powerSetDTO.getResourceId());
+                    RoleResource roleResource = new RoleResource(roleId, appId, powerSetDTO.getResourceId(), companyId);
+                    addRoleResourceList.add(roleResource);
+                }
+            }else{
+                if (powerSetDTO.getGroupId() != null && powerSetDTO.getResourceId() == null) {
+                    for (Resource resource : resourceList){
+                        if (resource.getClassify().equalsIgnoreCase(powerSetDTO.getClassify())){
+                            RoleResource roleResource = new RoleResource(roleId, appId, resource.getId(), companyId);
+                            delRoleResourceList.add(roleResource);
+                        }
+                    }
+                } else if (powerSetDTO.getResourceId() != null && powerSetDTO.getGroupId() == null) {
+                    RoleResource roleResource = new RoleResource(roleId, appId, powerSetDTO.getResourceId(), companyId);
+                    delRoleResourceList.add(roleResource);
+                }
+            }
+        }
+        for (RoleResource roleResource : delRoleResourceList) {
+            roleResourceMapper.delete(roleResource.getRoleId(), roleResource.getResourceId());
+        }
+        if (addRoleResourceList.size() > 0) {
+            roleResourceMapper.batchInsert(addRoleResourceList);
+        }
+        return true;
+    }
+
+    private void setOtherPower(PowerDTO powerDTO, Long groupId, Long roleId, List<OtherPower> otherPowerList) {
         List<OtherPower> otherPowers = new ArrayList<OtherPower>();
         for (OtherPower otherPower : otherPowerList){
-            if (otherPower.getGroupId().equals(groupId)){
+            if (groupId.equals(otherPower.getGroupId())){
                 otherPowers.add(otherPower);
             }
         }
@@ -138,6 +180,7 @@ public class RoleServiceImpl extends CommonBaseServiceImpl<RoleMapper, Role> imp
             switch (array[i]){
                 case "QUERY":
                     powerDTO.setQuery(true);
+                    powerDTO.setFileExport(true);
                     break;
                 case "ADD":
                     powerDTO.setAdd(true);

+ 13 - 2
base-servers/account/account-server/src/main/resources/mapper/RoleResourceMapper.xml

@@ -36,10 +36,21 @@
         <result column="id" property="resourceId" jdbcType="BIGINT" />
         <result column="group_id" property="groupId" jdbcType="BIGINT" />
         <result column="checked" property="checked" jdbcType="BOOLEAN" />
+        <result column="role_id" property="roleId" jdbcType="BIGINT" />
     </resultMap>
     <select id="selectOthersPower" resultMap="OtherPowerResultMap">
-      SELECT name,id,group_id,CASE WHEN ROLE_ID IS NULL THEN false ELSE true end checked FROM AC_RESOURCE
+      SELECT name,id,group_id,role_id,CASE WHEN ROLE_ID IS NULL THEN false ELSE true end checked FROM AC_RESOURCE
       LEFT JOIN ac_role_resource ON ID = RESOURCE_ID
-      WHERE CLASSIFY='OTHER' AND ROLE_ID=#{roleId}
+      WHERE CLASSIFY='OTHER'
     </select>
+    <insert id="batchInsert" parameterType="java.util.List">
+        INSERT INTO AC_ROLE_RESOURCE(ROLE_ID, RESOURCE_ID, COMPANY_ID, APP_ID)
+        VALUES
+        <foreach collection="list" item="item" index="index" open="" close="" separator=",">
+            (
+              #{item.roleId, jdbcType=BIGINT}, #{item.resourceId,jdbcType=BIGINT},
+              #{item.companyId, jdbcType=BIGINT}, #{item.appId,jdbcType=VARCHAR}
+            )
+        </foreach>
+    </insert>
 </mapper>

+ 89 - 1
base-servers/file/file-api/src/main/java/com/usoftchina/saas/file/api/FileApi.java

@@ -13,6 +13,8 @@ import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.util.List;
+
 /**
  * 文件接口
  *
@@ -37,7 +39,7 @@ public interface FileApi {
      * @return
      */
     @PostMapping(value = "/folder")
-    Result<FolderDTO> folder(FolderSaveDTO newFolder);
+    Result<FolderDTO> createFolder(FolderSaveDTO newFolder);
 
     /**
      * 根据id查看文件详情
@@ -48,6 +50,24 @@ public interface FileApi {
     @GetMapping(value = "/info/{id}")
     Result<FileInfoDTO> getFileInfo(@PathVariable(value = "id") Long id);
 
+    /**
+     * 根据path查看文件信息
+     *
+     * @param path
+     * @return
+     */
+    @GetMapping(value = "/info")
+    Result<FileInfoDTO> getFileInfoByPath(@RequestParam String path);
+
+    /**
+     * 查看子文件
+     *
+     * @param folderId
+     * @return
+     */
+    @GetMapping(value = "/list")
+    Result<List<FileInfoDTO>> listFiles(Long folderId);
+
     /**
      * 上传文件到指定文件夹
      *
@@ -58,4 +78,72 @@ public interface FileApi {
      */
     @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
     Result<FileInfoDTO> upload(Long folderId, @RequestPart(value = "file") MultipartFile file) throws Exception;
+
+    /**
+     * 文件下载
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping(value = "/download/{id}")
+    byte[] download(@PathVariable Long id);
+
+    /**
+     * 文件下载
+     *
+     * @param path
+     * @return
+     */
+    @GetMapping(value = "/download")
+    byte[] downloadByPath(@RequestParam String path);
+
+    /**
+     * 删除文件
+     *
+     * @param id
+     * @param purge true表示直接删除,false表示放入回收站
+     * @return
+     */
+    @GetMapping(value = "/delete/{id}")
+    Result delete(@PathVariable Long id,
+                  @RequestParam(required = false, defaultValue = "false") Boolean purge);
+
+    /**
+     * 删除文件
+     *
+     * @param id
+     * @param purge true表示直接删除,false表示放入回收站
+     * @return
+     */
+    @GetMapping(value = "/delete")
+    Result deleteByPath(@PathVariable Long id,
+                  @RequestParam(required = false, defaultValue = "false") Boolean purge);
+
+    /**
+     * 还原文件
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping(value = "/restore/{id}")
+    Result restore(@PathVariable Long id);
+
+    /**
+     * 还原文件
+     *
+     * @param path
+     * @return
+     */
+    @GetMapping(value = "/restore")
+    Result restoreByPath(@RequestParam String path);
+
+    /**
+     * 移动文件到文件夹
+     *
+     * @param fileId
+     * @param folderId
+     * @return
+     */
+    @GetMapping(value = "/move")
+    Result move(@RequestParam Long fileId, @RequestParam Long folderId);
 }

+ 3 - 1
base-servers/file/file-server/src/main/java/com/usoftchina/saas/file/controller/FileController.java

@@ -82,7 +82,7 @@ public class FileController {
 
     @ApiOperation(value = "创建文件夹")
     @PostMapping(value = "/folder")
-    public Result<FolderDTO> folder(FolderSaveDTO newFolder) {
+    public Result<FolderDTO> createFolder(FolderSaveDTO newFolder) {
         BizAssert.notNull(newFolder.getName(), ExceptionCode.FOLDER_NAME_EMPTY);
         // 检查父文件夹
         FileInfo parent = checkFolder(newFolder.getFolderId());
@@ -115,6 +115,8 @@ public class FileController {
     private void download(FileInfo info, HttpServletResponse response) throws Exception{
         response.setContentType("application/force-download");
         if (info.isFolder()) {
+            response.setHeader("Content-disposition",
+                    "attachment; filename=" + URLEncoder.encode(info.getName() + ".zip", "UTF-8"));
             // 压缩后下载
             try (ArchiveOutputStream out = new ZipArchiveOutputStream(response.getOutputStream());) {
                 cascadeOutput(info, null, out);

+ 16 - 1
frontend/saas-web/app/Application.scss

@@ -175,7 +175,22 @@ body.launching {
       color:#fff !important;
   }
 }
-
+.x-formpanel-btn-white {
+    border: 1px solid #c1c1c1 !important;
+    //border-radius: 2px;
+    box-shadow: 0 1px 1px rgba(0,0,0,.15);
+    /*background: #fff;
+    background: -moz-linear-gradient(top,#fff,#f4f4f4);
+    background: -webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f4f4f4));
+    background: -o-linear-gradient(top,#fff,#f4f4f4);
+    background: -ms-linear-gradient(top,#fff 0,#f4f4f4 100%);
+    background: linear-gradient(top,#fff,#f4f4f4); */
+    border-color: #fff;
+    background: linear-gradient(to bottom,#fff,#f4f4f4 100%) !important;
+    .x-btn-inner-default-toolbar-small{
+      color: #555;
+  }
+}
 .x-grid-body {
   border-width: 1px;
   border-color: #ABDAFF;

+ 18 - 9
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -46,35 +46,37 @@ Ext.define('saas.view.core.form.FormPanel', {
         unAuditText: '未审核',
         auditBtnText: '审核',
         unAuditBtnText: '反审核',
+        messageLogText:'操作日志'
     },
-    buttons:[{
+    /* buttons:[{
         text:'操作日志',
+        bind: {
+            hidden: 'isNewPanle'
+        },
         handler:function(btn){
             var form = btn.up('form'),
             mlKeyvalue = form.viewModel.get(form._idField)||0,
             win = Ext.getCmp(form.xtype+mlKeyvalue);
-            if (!win) {
-                win = Ext.create('Ext.window.Window', {
+            if (!win&&mlKeyvalue!=0) {
+                var win = form.add(Ext.create('Ext.window.Window', {
                     modal: true,
                     id:form.xtype+mlKeyvalue,
-                    height: '80%',
+                    height: '60%',
                     width: '80%',
                     title: '操作日志('+form.viewModel.get(form._codeField)+')',
                     scrollable: true,
-                    //bodyPadding: 10,
                     constrain: true,
                     closable: true,
                     layout: 'fit',
-                    renderTo: Ext.getCmp('main-tab-panel').getActiveTab().down('form').getEl(),
                     items: [{
                         xtype: 'core-form-mseeageLog',
                         mlKeyvalue:mlKeyvalue
                     }]
-                });
+                }));
             };
             win.show();
         }
-    }],
+    }], */
     initComponent: function () {
         var me = this,
         auditTexts = me.auditTexts;
@@ -121,7 +123,14 @@ Ext.define('saas.view.core.form.FormPanel', {
                 hidden:'{!showAuditBtn}'
             },
             handler: "auditBtnClick",
-        }];
+        }, {
+            cls:'x-formpanel-btn-white',
+            text:'操作日志',
+            bind: {
+                hidden: '{!id}'
+            },
+            handler:"showMessageLog"
+        } ];
 
         Ext.apply(me, {
             dockedItems: [{

+ 35 - 1
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -32,6 +32,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
     },
 
     initCopyData: function(formData) {
+        var me = this;
         var form = this.getView();
         var detailCount = form.detailCount;
         var main = formData.main;
@@ -67,6 +68,10 @@ Ext.define('saas.view.core.form.FormPanelController', {
             }
         }
 
+        return me.myInitCopyData(formData);;
+    },
+
+    myInitCopyData: function(formData) {
         return formData;
     },
     
@@ -291,7 +296,36 @@ Ext.define('saas.view.core.form.FormPanelController', {
         var me = this,
         viewModel = me.getViewModel(),
         codeEditable = viewModel.get('base.codeEditable');
-
         viewModel.set('base.codeEditable', !codeEditable);
+    },
+    showMessageLog:function(btn){
+        var me = this,
+        form = me.getView(),
+        viewModel = me.getViewModel(),
+        mlKeyvalue = viewModel.get(form._idField),
+        win = Ext.getCmp(form.xtype+mlKeyvalue);
+        if (!win&&mlKeyvalue!=0) {
+            var win = form.add(Ext.create('Ext.window.Window', {
+                modal: true,
+                id:me.xtype+mlKeyvalue,
+                height: '60%',
+                width: '80%',
+                title: '操作日志('+viewModel.get(form._codeField)+')',
+                scrollable: true,
+                constrain: true,
+                closable: true,
+                layout: 'fit',
+                items: [{
+                    xtype: 'core-form-mseeageLog',
+                    mlKeyvalue:mlKeyvalue
+                }],
+                listeners:{
+                    'close':function(){
+                        btn.removeCls('x-btn-focus');
+                    }
+                }
+            }));
+        };
+        win.show();
     }
 });

+ 125 - 0
frontend/saas-web/app/view/core/form/field/Month.js

@@ -0,0 +1,125 @@
+/**
+ * Created by zhouy on 2018/11/12.
+ */
+Ext.define('saas.view.core.form.field.Month', {
+    extend:'Ext.form.field.Picker',
+    alias: 'widget.monthdatefield',
+    requires: ['Ext.picker.Month'],
+    format : "Ym",
+    disabledDaysText : "Disabled",
+    disabledDatesText : "Disabled",
+    triggerCls : Ext.baseCSSPrefix + 'form-date-trigger',
+    matchFieldWidth: false,
+    componentCls: Ext.baseCSSPrefix + 'form-field-date',
+    ariaRole: 'combobox',
+    validateOnFocusLeave: true,
+    hideOnSelect:true,
+    editable:false,
+    autoValue:true,
+    initComponent: function() {
+        var me = this,
+            isString = Ext.isString,
+            min, max;
+
+        min = me.minValue;
+        max = me.maxValue;
+        if(isString(min)){
+            me.minValue = me.parseDate(min);
+        }
+        if(isString(max)){
+            me.maxValue = me.parseDate(max);
+        }
+        me.disabledDatesRE = null;
+        if(Ext.isEmpty(me.value)){
+            me.value=me.getCurrentVal();
+        }
+        me.callParent();
+    },
+    createPicker: function() {
+        var me = this,
+            picker = me.monthPicker,
+            format = Ext.String.format;
+       return me.monthPicker=picker=new Ext.picker.Month({
+            id: me.id + '-picker',
+            pickerField: me,
+            floating: true,
+            preventRefocus: true,
+            value:me.getPickerValues(),
+            format: me.format,
+            ownerCmp: me,
+            listeners: {
+                scope:me,
+                cancelclick: me.onCancelClick,
+                okclick: me.onOkClick,
+                yeardblclick: me.onOkClick,
+                monthdblclick: me.onOkClick
+            },
+            keyNavConfig: {
+                esc: function() {
+                    me.inputEl.focus();
+                    me.collapse();
+                }
+            }
+        });
+    },
+    getActive: function(){
+        return this.activeDate || this.value;
+    },
+    onOkClick: function(picker, value) {
+        var me = this,
+            month = value[0],
+            year = value[1];
+        if (value.length == 2) {
+            month = month == null ? new Date().getMonth() : month;
+            month = Number(month) + 1;
+            month = month < 10 ? '0' + month : month;
+            year = year == null ? new Date().getFullYear() : year;
+            if (this.minValue) {
+                if (Number(year + '' + month) < this.minYearMonth) {
+                    return;
+                }
+            }
+            if (this.maxValue) {
+                if (Number(year + '' + month) > this.maxYearMonth) {
+                    return;
+                }
+            }
+            this.setValue(year + '' + month);
+        }
+        me.onSelect();
+    },
+    getCurrentVal:function(){
+        return Ext.Date.format(new Date(), this.format);
+    },
+    onCancelClick: function() {
+        this.onSelect();
+    },
+    getPickerValues:function() {
+        var val = this.value, year, month;
+        if (val && val.length == 6) {
+            year = Ext.Number.from(val.substring(0, 4), 0);
+            month = Ext.Number.from(val.substring(4, 6), 0);
+            month = month-1;
+        } else {
+            year = new Date().getFullYear();
+            month = new Date().getMonth();
+        }
+        return [month, year];
+    },
+    setValue: function (value) {
+        if (Ext.isEmpty(value)) {
+            value =this.getCurrentVal();
+        }
+        var f = value.match(/^(\d{4})(\d{2})$/);
+        if(f) {
+            var d = f[1] + '-' + f[2];
+            value = Ext.Date.format(new Date(d), this.format);
+        }
+        this.callParent([value]);
+        this.publishState('value', value);
+    },
+    onSelect: function() {
+        this.monthPicker.hide();
+    }
+
+});

+ 6 - 6
frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -28,18 +28,18 @@ Ext.define('saas.view.document.customer.FormPanel', {
         fieldLabel: 'id',
         allowBlank: true,
         columnWidth: 0.25
-    },{
-        xtype: 'textfield',
-        name: 'cu_name',
-        fieldLabel: '客户名称',
-        allowBlank: false,
-        columnWidth: 0.5
     },{
         xtype: 'textfield',
         name: 'cu_code',
         fieldLabel: '客户编号',
         allowBlank: false,
         columnWidth: 0.25
+    },{
+        xtype: 'textfield',
+        name: 'cu_name',
+        fieldLabel: '客户名称',
+        allowBlank: false,
+        columnWidth: 0.5
     },{
         editable:false,
         xtype : "remotecombo", 

+ 44 - 24
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -44,7 +44,6 @@ Ext.define('saas.view.document.product.BasePanel', {
     _formXtype:'document-product-formpanel',
     _title:'物料资料',
     _deleteUrl:'/api/document/product/delete/',
-    // _dataUrl:'http://192.168.253.31:9480/product/list',
     _batchOpenUrl:'/api/document/product/batchOpen',
     _batchCloseUrl:'/api/document/product/batchClose',
     _batchDeleteUrl:'/api/document/product/batchDelete',
@@ -62,32 +61,53 @@ Ext.define('saas.view.document.product.BasePanel', {
         },{
             text : "物料编号", 
             width : 200.0, 
-            dataIndex : "pr_code", 
-            xtype : "", 
-        }, 
-        {
+            dataIndex : "pr_code"
+        }, {
             text : "物料名称", 
             dataIndex : "pr_detail", 
-            width : 120.0, 
-            xtype : "", 
-        },
-        {
+            width : 120.0
+        }, {
+            text : "规格", 
+            dataIndex : "pr_spec"
+        }, {
+            text : "类型", 
+            dataIndex : "pr_kind"
+        }, {
+            text : "单位", 
+            dataIndex : "pr_unit"
+        }, {
+            text : "总库存数", 
+            dataIndex : "po_onhand",
+            xtype: 'numbercolumn'
+        }, {
+            text : "单位成本", 
+            dataIndex : "pr_standardprice",
+            xtype: 'numbercolumn'
+        }, {
+            text : "最新采购单价", 
+            dataIndex : "pr_purcprice",
+            xtype: 'numbercolumn'
+        }, {
+            text : "最新出库单价", 
+            dataIndex : "pr_saleprice",
+            xtype: 'numbercolumn'
+        }, {
+            text : "型号", 
+            dataIndex : "pr_orispeccode"
+        }, {
+            text : "品牌", 
+            dataIndex : "pr_brand"
+        }, {
+            text : "最小包装", 
+            dataIndex : "pr_zxbzs",
+            xtype: 'numbercolumn'
+        }, {
+            text : "L/T", 
+            dataIndex : "pr_leadtime",
+            xtype: 'numbercolumn'
+        }, {
             text : "状态", 
-            dataIndex : "pr_status", 
-            width : 120.0, 
-            xtype : ""
-        }, 
-        {
-            text : "状态码", 
-            dataIndex : "pr_statuscode", 
-            width : 0, 
-            xtype : ""
-        }, 
-        {
-            text : "物料种类", 
-            dataIndex : "pr_kind", 
-            width : 120.0, 
-            xtype : "",
+            dataIndex : "pr_status"
         }]
     },
 

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

@@ -23,62 +23,51 @@ Ext.define('saas.view.document.product.FormPanel', {
 
     codeInHeader: false,
 
-
     defaultItems: [{
         xtype: 'hidden',
         name: 'id',
         fieldLabel: 'id',
-        allowBlank: true,
-        columnWidth: 0.25
+        allowBlank: true
     },{
         xtype: 'textfield',
         name: 'pr_code',
         fieldLabel: '物料编号',
-        allowBlank: false,
-        columnWidth: 0.25
+        allowBlank: false
     },{
         xtype: 'textfield',
         name: 'pr_detail',
         fieldLabel: '物料名称',
-        allowBlank: false,
-        columnWidth: 0.25
+        allowBlank: false
     },{
         xtype: 'hidden',
         name: 'pr_status',
-        fieldLabel: '状态',
-        allowBlank: true,
-        columnWidth: 0.25
+        fieldLabel: '状态'
     },{
         xtype: 'hidden',
         name: 'pr_statuscode',
-        fieldLabel: '状态码',
-        allowBlank: true,
-        columnWidth: 0.25
+        fieldLabel: '状态码'
     },{
         xtype: 'textfield',
         name: 'pr_spec',
         fieldLabel: '规格',
-        allowBlank: false,
-        columnWidth: 0.25
-    },{  
+        allowBlank: false
+    },{
         editable:false,
         xtype : "remotecombo", 
-        storeUrl:'/api/document/productunit/getCombo',
-        name : "pr_unit", 
-        fieldLabel : "单位", 
+        storeUrl:'/api/document/producttype/getCombo',
+        name : "pr_kind", 
+        fieldLabel : "类型", 
         allowBlank : false, 
-        columnWidth : 0.25,
-        editable:false,
         addHandler:function(b){
             var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {
-                    title: '新增物料单位'
+                    title: '新增物料类型'
                 },
-                dataKind:'productunit',
-                belong:document.etc['productunit'],
+                dataKind:'productkind',
+                belong:document.etc['productkind'],
                 _parent:form,
                 _combo:this.ownerCmp,
                 record:null,
@@ -87,37 +76,25 @@ Ext.define('saas.view.document.product.FormPanel', {
             this.dialog.show();
         }
     },{
-        xtype : "dbfindtrigger",   
-        name : "pr_vendcode", 
-        bind : "{pr_vendcode}", 
-        fieldLabel : "供应商编号", 
-        allowBlank : true, 
-        columnWidth : 0.25, 
-    }, {
-        xtype : "textfield", 
-        name : "pr_vendname", 
-        bind : "{pr_vendname}", 
-        fieldLabel : "供应商名称", 
-        allowBlank : true, 
-        columnWidth : 0.25
+        xtype: 'textfield',
+        name: 'pr_orispeccode',
+        fieldLabel: '型号'
     },{
         editable:false,
         xtype : "remotecombo", 
-        storeUrl:'/api/document/producttype/getCombo',
-        name : "pr_kind", 
-        fieldLabel : "类型", 
-        allowBlank : false, 
-        columnWidth : 0.25,
+        storeUrl:'/api/document/productbrand/getCombo',
+        name : "pr_brand", 
+        fieldLabel : "品牌", 
         addHandler:function(b){
             var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {
-                    title: '新增物料类型'
+                    title: '新增物料品牌'
                 },
-                dataKind:'productkind',
-                belong:document.etc['productkind'],
+                dataKind:'productbrand',
+                belong:document.etc['productbrand'],
                 _parent:form,
                 _combo:this.ownerCmp,
                 record:null,
@@ -125,30 +102,24 @@ Ext.define('saas.view.document.product.FormPanel', {
             });
             this.dialog.show();
         }
-    },{
-        xtype: 'textfield',
-        name: 'pr_orispeccode',
-        fieldLabel: '型号',
-        allowBlank: true,
-        columnWidth: 0.25
-    },{
+    },{  
         editable:false,
         xtype : "remotecombo", 
-        storeUrl:'/api/document/productbrand/getCombo',
-        name : "pr_brand", 
-        fieldLabel : "物料品牌", 
-        allowBlank : true, 
-        columnWidth : 0.25,
+        storeUrl:'/api/document/productunit/getCombo',
+        name : "pr_unit", 
+        fieldLabel : "单位", 
+        allowBlank : false, 
+        editable:false,
         addHandler:function(b){
             var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {
-                    title: '新增物料品牌'
+                    title: '新增物料单位'
                 },
-                dataKind:'productbrand',
-                belong:document.etc['productbrand'],
+                dataKind:'productunit',
+                belong:document.etc['productunit'],
                 _parent:form,
                 _combo:this.ownerCmp,
                 record:null,
@@ -156,103 +127,76 @@ Ext.define('saas.view.document.product.FormPanel', {
             });
             this.dialog.show();
         }
-    },{
-        xtype : "hidden", 
-        name : "pr_vendid", 
-        bind : "{pr_vendid}", 
-        fieldLabel : "供应商ID", 
-        allowBlank : true, 
-        columnWidth : 0
     },{
         xtype : "hidden", 
         name : "pr_whid", 
-        bind : "{pr_whid}", 
-        fieldLabel : "仓库ID", 
-        allowBlank : true, 
-        columnWidth : 0
+        fieldLabel : "仓库ID"
     },{  
         xtype : "dbfindtrigger",     
         name : "pr_whcode", 
-        bind : "{pr_whcode}", 
         fieldLabel : "仓库编号", 
-        allowBlank : true, 
-        columnWidth : 0.25, 
     }, {
         xtype : "textfield", 
         name : "pr_whname", 
         fieldLabel : "仓库名称", 
         allowBlank : true, 
         columnWidth : 0.25
+    },{
+        xtype : "hidden", 
+        name : "pr_vendid", 
+        fieldLabel : "供应商ID", 
+        columnWidth : 0
+    },{
+        xtype : "dbfindtrigger",   
+        name : "pr_vendcode", 
+        fieldLabel : "供应商编号"
+    }, {
+        xtype : "textfield", 
+        name : "pr_vendname", 
+        fieldLabel : "供应商名称"
     },{
         xtype : "numberfield", 
-        bind : "{pr_standardprice}",
         name : "pr_standardprice", 
         fieldLabel : "标准单价", 
         allowBlank : true, 
         columnWidth : 0.25,
         decimalPrecision: 8,
-        minValue:0,
-        renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length)).fill('0');
-            var format = '0.' + xr.join();
-            return Ext.util.Format.number(v, format);
-        },
+        minValue:0
     },{
         ignore:true,
         readOnly:true,
         xtype : "numberfield", 
-        bind : "{pr_purcprice}",
         name : "pr_purcprice", 
         fieldLabel : "最新采购单价", 
         allowBlank : true, 
         columnWidth : 0.25,
         decimalPrecision: 8,
-        minValue:0,
-        renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length)).fill('0');
-            var format = '0.' + xr.join();
-            return Ext.util.Format.number(v, format);
-        },
+        minValue:0
     },{
         ignore:true,
         readOnly:true,
         xtype : "numberfield", 
         name : "pr_saleprice", 
         fieldLabel : "最新出货单价", 
-        allowBlank : true, 
-        columnWidth : 0.25,
         decimalPrecision: 8,
-        minValue:0,
-        renderer : function(v) {
-            var arr = (v + '.').split('.');
-            var xr = (new Array(arr[1].length)).fill('0');
-            var format = '0.' + xr.join();
-            return Ext.util.Format.number(v, format);
-        },
+        minValue:0
     },{
         xtype : "numberfield", 
         name : "pr_zxbzs", 
         fieldLabel : "最小包装数", 
         minValue:0,
         decimalPrecision: 0,
-        allowBlank : true, 
-        columnWidth : 0.25
+        allowBlank : true
     },{  
         hidden:true,
         xtype : "datefield", 
         name : "createTime", 
-        fieldLabel : "创建时间", 
-        allowBlank : true, 
-        columnWidth : 0.25
+        fieldLabel : "创建时间"
     },{  
         hidden:true,
         xtype : "datefield", 
         name : "updateTime", 
-        fieldLabel : "更新时间", 
-        allowBlank : true, 
-        columnWidth : 0.25
+        fieldLabel : "更新时间"
     }],
 
     defaultButtons:[{

+ 4 - 1
frontend/saas-web/app/view/document/vendor/BasePanel.js

@@ -77,7 +77,10 @@ Ext.define('saas.view.document.vendor.BasePanel', {
             xtype: 'numbercolumn',
             dataIndex : "ve_promisedays", 
             width : 120.0, 
-            align:'end'
+            align:'end', 
+            renderer : function(v) {
+                return Ext.util.Format.number(v, '0');
+            }
         }, {
             text : "纳税人识别号", 
             dataIndex : "ve_nsrzh", 

+ 6 - 6
frontend/saas-web/app/view/document/vendor/FormPanel.js

@@ -28,18 +28,18 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         fieldLabel: 'id',
         allowBlank: true,
         columnWidth: 0.25
-    },{
-        xtype: 'textfield',
-        name: 've_name',
-        fieldLabel: '供应商名称',
-        allowBlank: false,
-        columnWidth: 0.5
     },{
         xtype: 'textfield',
         name: 've_code',
         fieldLabel: '供应商编号',
         allowBlank: false,
         columnWidth: 0.25
+    },{
+        xtype: 'textfield',
+        name: 've_name',
+        fieldLabel: '供应商名称',
+        allowBlank: false,
+        columnWidth: 0.5
     },{
         xtype: 'hidden',
         name: 've_status',

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

@@ -56,6 +56,7 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
         xtype:'datefield',
         name : 'or_date',
         fieldLabel : '单据日期',
+        defaultValue: new Date(),
         allowBlank : false
     },{
         name : "detailGridField", 

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

@@ -56,6 +56,7 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
         xtype:'datefield',
         name : 'os_date',
         fieldLabel : '单据日期',
+        defaultValue: new Date(),
         allowBlank : false
     },{
         name : "detailGridField", 

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

@@ -21,9 +21,9 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
     _unAuditUrl: '/api/money/paybalance/unAudit/',
     _deleteUrl: '/api/money/paybalance/delete/',
 
-    _readUrl: 'http://192.168.253.35:8880/paybalance/read/',
+    // _readUrl: 'http://192.168.253.35:8880/paybalance/read/',
     // _saveUrl: 'http://192.168.253.129:8940/money/paybalance/save/',
-    _auditUrl: 'http://192.168.253.35:8880/paybalance/audit/',
+    // _auditUrl: 'http://192.168.253.35:8880/paybalance/audit/',
     // _unAuditUrl: 'http://192.168.253.35Pb_pdamount:8880/paybalance/unAudit/',
     // _deleteUrl: 'http://192.168.253.129:8940/money/paybalance/delete/',
     
@@ -64,6 +64,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         xtype: "datefield",
         name: "pb_date",
         fieldLabel: "日期",
+        defaultValue: new Date(),
         allowBlank : false
     },{
         xtype: 'textfield',
@@ -85,7 +86,8 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
     }, {
         xtype: 'numberfield',
         name: 'pb_discounts',
-        fieldLabel: '整单折扣'
+        fieldLabel: '整单折扣',
+        hidden: true
     }, {
         xtype: 'hidden',
         name: 'pb_havebalance',
@@ -244,7 +246,8 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         }, {
             text: "已核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "pbd_havebalance",
+            dataIndex: "sl_yamount",
+            ignore:true,
             // editor : {
             //     xtype : "numberfield",
             //     decimalPrecision: 2
@@ -265,7 +268,8 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         }, {
             text: "未核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "pbd_pbdamount",
+            dataIndex: "sl_namount",
+            ignore:true,
             // editor : {
             //     xtype : "numberfield",
             //     decimalPrecision: 2

+ 6 - 5
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -106,10 +106,10 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             to: 'pbd_amount'
                         },{
                             from: 'sl_yamount',
-                            to: 'pb_havebalance'
+                            to: 'sl_yamount'
                         },{
                             from: 'sl_namount',
-                            to: 'pb_pbdamount'
+                            to: 'sl_namount'
                         },{
                             from:'sl_date',
                             to:'pbd_sldate'
@@ -160,9 +160,9 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             align:'end'
                         }, {
                             "text": "已核销金额",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "sl_yamount",
-                            "width": 200,
+                            "width": 150,
                             xtype: 'numbercolumn',
                             align:'end',
                             "items": null
@@ -177,7 +177,8 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             "text": "单据日期",
                             "flex": 1,
                             "dataIndex": "sl_date",
-                            "width": 150,
+                            "width": 120,
+                            xtype: 'datecolumn',
                             align:'end'
                         }]
                     });

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

@@ -65,6 +65,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         xtype: "datefield",
         name: "rb_date",
         fieldLabel: "日期",
+        defaultValue: new Date(),
         allowBlank : false
     }, {
         xtype: "textfield",
@@ -78,7 +79,8 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
     }, {
         xtype: "numberfield",
         name: "rb_discounts",
-        fieldLabel: "整单折扣"
+        fieldLabel: "整单折扣",
+        hidden: true
     }, {
         xtype: 'numberfield',
         name: 'rb_preamount',
@@ -249,7 +251,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "已核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "rbd_havebalance",
+            dataIndex: "sl_yamount",
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length)).fill('0');
@@ -266,7 +268,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "未核销金额",
             xtype: 'numbercolumn',
-            dataIndex: "rbd_pbdamount",
+            dataIndex: "sl_namount",
             renderer : function(v) {
                 var arr = (v + '.').split('.');
                 var xr = (new Array(arr[1].length)).fill('0');

+ 4 - 3
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -184,10 +184,10 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                             to: 'rbd_amount'
                         },{
                             from: 'sl_yamount',
-                            to: 'rbd_havebalance'
+                            to: 'sl_yamount'
                         },{
                             from: 'sl_namount',
-                            to: 'rbd_pbdamount'
+                            to: 'sl_namount'
                         },{
                             from:'sl_date',
                             to:'rbd_sldate'
@@ -255,7 +255,8 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                             "text": "单据日期",
                             "flex": 1,
                             "dataIndex": "sl_date",
-                            "width": 150,
+                            "width": 120,
+                            xtype: 'datecolumn',
                             align:'end'
                         }]
                     });

+ 2 - 2
frontend/saas-web/app/view/money/report/AccountBalance.js

@@ -11,13 +11,13 @@ Ext.define('saas.view.money.report.AccountBalance', {
     listUrl: '/api/money/report/accountBalance',
     defaultCondition: null,
     reportTitle: '资金账户收支明细',
-    QueryWidth:0.2,
+    QueryWidth:0.25,
     //筛选:账户、日期(必填)
     searchItems: [ {
         xtype: 'dbfindtrigger',
         name: 'bankcode',
         fieldLabel: '账户名称',
-        columnWidth: 0.2
+        columnWidth: 0.25
     }, {
         xtype: 'condatefield',
         name: 'date',

+ 2 - 2
frontend/saas-web/app/view/money/report/PayDetail.js

@@ -10,13 +10,13 @@ Ext.define('saas.view.money.report.PayDetail', {
     listUrl: '/api/money/report/payDetail',
     defaultCondition: null,
     reportTitle: '应付账款明细表',
-    QueryWidth:0.2,
+    QueryWidth:0.25,
     //筛选:供应商、日期(必填)
     searchItems: [ {
         xtype: 'dbfindtrigger',
         name: 'pi_vendname',
         fieldLabel: '供应商名称',
-        columnWidth: 0.2
+        columnWidth: 0.25
     }, {
         xtype: 'condatefield',
         name: 'pb_date',

+ 2 - 2
frontend/saas-web/app/view/money/report/RecDetail.js

@@ -11,13 +11,13 @@ Ext.define('saas.view.money.report.RecDetail', {
     listUrl: '/api/money/report/recDetail',
     defaultCondition: null,
     reportTitle: '应收账款明细',
-    QueryWidth:0.2,
+    QueryWidth:0.25,
     //筛选:客户、日期(必填)
     searchItems: [ {
         xtype: 'dbfindtrigger',
         name: 'pi_custname',
         fieldLabel: '客户名称',
-        columnWidth: 0.2
+        columnWidth: 0.25
     }, {
         xtype: 'condatefield',
         name: 'pb_date',

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

@@ -11,13 +11,13 @@ Ext.define('saas.view.money.report.VendorCheck', {
     listUrl: '/api/money/report/vendorCheck',
     defaultCondition: null,
     reportTitle: '供应商对账单',
-    QueryWidth:0.2,
+    QueryWidth:0.25,
     //筛选:供应商、日期(必填)
     searchItems: [ {
         xtype: 'dbfindtrigger',
         name: 'pi_vendname',
         fieldLabel: '供应商名称',
-        columnWidth: 0.2
+        columnWidth: 0.25
     }, {
         xtype: 'condatefield',
         name: 'pi_date',

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

@@ -116,7 +116,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             width: 120
         },{
             text: '单据日期',
-            dataIndex: 'pu_indate',
+            dataIndex: 'pu_date',
             xtype: 'datecolumn',
             width: 200
         }, {
@@ -143,24 +143,32 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             width: 100,
             hidden: true
         }, {
-            text: '单据编号',
+            text: '采购单号',
             dataIndex: 'pu_code',
             width: 200
+        },{
+            text: '供应商编号',
+            dataIndex: 'pu_vendcode',
+            width: 120
+        },{
+            text: '供应商名称',
+            dataIndex: 'pu_vendname',
+            width: 120
         }, {
             text: '审核状态',
             dataIndex: 'pu_status',
             width: 120
+        },{
+            text: '业务状态',
+            dataIndex: 'pu_acceptstatus',
+            width: 120
         }, {
             text: '单据日期',
-            dataIndex: 'pu_indate',
+            dataIndex: 'pu_date',
             xtype: 'datecolumn',
             width: 200
         }, {
-            text: '供应商名称',
-            dataIndex: 'pu_vendname',
-            width: 120
-        }, {
-            text: '采购序号',
+            text: '序号',
             dataIndex: 'pd_detno',
             xtype: 'numbercolumn',
             width: 120
@@ -168,19 +176,46 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             text: '物料编号',
             dataIndex: 'pd_prodcode',
             width: 120
+        },{
+            text: '物料名称',
+            dataIndex: 'pr_detail',
+            width: 120
+        }, {
+            text: '物料规格',
+            dataIndex: 'pr_spec',
+            width: 120
         }, {
-            text: '数量',
+            text: '单位',
+            dataIndex: 'pr_spec',
+            width: 120
+        },{
+            text: '采购数量',
             dataIndex: 'pd_qty',
             xtype: 'numbercolumn',
             width: 120
         }, {
+            text: '交货日期',
+            dataIndex: 'pd_delivery',
+            xtype: 'datecolumn',
+            width: 200
+        },{
             text: '单价',
             dataIndex: 'pd_price',
             xtype: 'numbercolumn',
             width: 120
         }, {
-            text: '已转数',
-            dataIndex: 'pd_ytqy',
+            text: '税率',
+            dataIndex: 'pd_taxrate',
+            xtype: 'numbercolumn',
+            width: 120
+        },{
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype: 'numbercolumn',
+            width: 120
+        },{
+            text: '备注',
+            dataIndex: 'pu_remark',
             xtype: 'numbercolumn',
             width: 120
         }]

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

@@ -115,6 +115,10 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             text: '审核状态',
             dataIndex: 'pi_status',
             width: 120
+        },{
+            text: '供应商编号',
+            dataIndex: 'pi_vendcode',
+            width: 120
         },{
             text: '供应商名称',
             dataIndex: 'pi_vendname',
@@ -139,47 +143,52 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             hidden:true
         }, {
             text: '单据编号',
-            dataIndex: 'pd_inoutno',
+            dataIndex: 'pi_inoutno',
             width: 200
         }, {
+            text: '单据类型',
+            dataIndex: 'pd_piclass',
+            width: 200
+        },{
             text: '审核状态',
             dataIndex: 'pi_status',
             width: 120
-        }, {
-            text: '单据日期',
-            dataIndex: 'pi_date',
-            xtype:'datecolumn',
-            width: 200
+        },{
+            text: '供应商编号',
+            dataIndex: 'pi_vendcode',
+            width: 120
         },{
             text: '供应商名称',
             dataIndex: 'pi_vendname',
             width: 120
         },{
-            text: '采购单号',
-            dataIndex: 'pd_ordercode',
+            text: '物料编号',
+            dataIndex: 'pd_prodcode',
             width: 120
         },{
-            text: '采购序号',
-            dataIndex: 'pd_orderdetno',
-            xtype:'numbercolumn',
+            text: '物料名称',
+            dataIndex: 'pr_detail',
             width: 120
         },{
-            text: '物料编号',
-            dataIndex: 'pd_prodcode',
+            text: '物料规格',
+            dataIndex: 'pr_spec',
+            width: 120
+        },{
+            text: '单位',
+            dataIndex: 'pr_unit',
             width: 120
         },{
-            text: '验收数量',
+            text: '数量',
             dataIndex: 'pd_inqty',
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '采购单价',
-            dataIndex: 'pd_orderprice',
-            xtype:'numbercolumn',
+            text: '仓库',
+            dataIndex: 'pd_whname',
             width: 120
         },{
-            text: '金额',
-            dataIndex: 'pd_total',
+            text: '单位成本',
+            dataIndex: 'pd_orderprice',
             xtype:'numbercolumn',
             width: 120
         },{
@@ -188,8 +197,13 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '成本单价',
-            dataIndex: 'pd_price',
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '相关单号',
+            dataIndex: 'pd_ordercode',
             xtype:'numbercolumn',
             width: 120
         }]

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

@@ -143,51 +143,56 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
         relativeColumn: [{
             text: 'id',
             dataIndex: 'pu_id',
-            width: 0,
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            hidden:true
         }, {
             text: '单据编号',
-            dataIndex: 'pd_inoutno',
+            dataIndex: 'pi_inoutno',
             width: 200
         }, {
+            text: '单据类型',
+            dataIndex: 'pd_piclass',
+            width: 200
+        },{
             text: '审核状态',
             dataIndex: 'pi_status',
             width: 120
-        }, {
-            text: '单据日期',
-            dataIndex: 'pi_date',
-            xtype:'datecolumn',
-            width: 200
+        },{
+            text: '供应商编号',
+            dataIndex: 'pi_vendcode',
+            width: 120
         },{
             text: '供应商名称',
             dataIndex: 'pi_vendname',
             width: 120
         },{
-            text: '采购单号',
-            dataIndex: 'pd_ordercode',
+            text: '物料编号',
+            dataIndex: 'pd_prodcode',
             width: 120
         },{
-            text: '采购序号',
-            dataIndex: 'pd_orderdetno',
-            xtype:'numbercolumn',
+            text: '物料名称',
+            dataIndex: 'pr_detail',
             width: 120
         },{
-            text: '物料编号',
-            dataIndex: 'pd_prodcode',
+            text: '物料规格',
+            dataIndex: 'pr_spec',
+            width: 120
+        },{
+            text: '单位',
+            dataIndex: 'pr_unit',
             width: 120
         },{
-            text: '验收数量',
+            text: '数量',
             dataIndex: 'pd_inqty',
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '采购单价',
-            dataIndex: 'pd_orderprice',
-            xtype:'numbercolumn',
+            text: '仓库',
+            dataIndex: 'pd_whname',
             width: 120
         },{
-            text: '金额',
-            dataIndex: 'pd_total',
+            text: '单位成本',
+            dataIndex: 'pd_orderprice',
             xtype:'numbercolumn',
             width: 120
         },{
@@ -196,10 +201,15 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '成本单价',
-            dataIndex: 'pd_price',
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '相关单号',
+            dataIndex: 'pd_ordercode',
             xtype:'numbercolumn',
-            width: 120,
+            width: 120
         }]
     }
 });

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

@@ -247,7 +247,7 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         addTitle: 'BOM资料',
                         //放大镜赋值设置
                         dbfinds:[{
-                            from:'id',to:'ma_prodid'
+                            from:'bo_motherid',to:'ma_prodid'
                         },{
                             from:'bo_mothercode',to:'ma_prodcode'
                         },{

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

@@ -49,23 +49,6 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
         readOnly:true,
         allowBlank : true, 
         columnWidth : 0.25
-    }, {
-        xtype : "hidden", 
-        name : "pi_vendid", 
-        bind : "{pi_vendid}", 
-        fieldLabel : "供应商ID", 
-        allowBlank : true, 
-        columnWidth : 0.0
-    },{
-        xtype: 'hidden',
-        name: 'pi_vendcode',
-        bind: '{pi_vendcode}',
-        fieldLabel: '供应商编号'
-    }, {
-        xtype: 'dbfindtrigger',
-        name: 'pi_vendname',
-        bind: '{pi_vendname}',
-        fieldLabel: '供应商名称'
     },{
         xtype : "hidden", 
         name : "pi_custid", 

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

@@ -30,15 +30,15 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         columnWidth: 0.5
     }, {
         xtype: 'textfield',
-        name: 'pi_vendcode',
-        fieldLabel: '供应商编号',
+        name: 'pi_custcode',
+        fieldLabel: '客户编号',
         allowBlank: true,
         hidden:true,
         columnWidth: 0.25
     }, {
         xtype: 'dbfindtrigger',
-        name: 'pi_vendname',
-        fieldLabel: '供应商名称',
+        name: 'pi_custname',
+        fieldLabel: '客户名称',
         allowBlank: true,
         columnWidth: 0.25
     }, {
@@ -128,51 +128,56 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
         relativeColumn: [{
             text: 'id',
             dataIndex: 'pu_id',
-            width: 0,
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            hidden:true
         }, {
             text: '单据编号',
-            dataIndex: 'pd_inoutno',
+            dataIndex: 'pi_inoutno',
             width: 200
         }, {
-            text: '审核状态',
-            dataIndex: 'pi_status',
-            width: 120
-        }, {
-            text: '单据日期',
-            dataIndex: 'pi_date',
-            xtype:'datecolumn',
+            text: '单据类型',
+            dataIndex: 'pd_piclass',
             width: 200
         },{
-            text: '供应商名称',
-            dataIndex: 'pi_vendname',
+            text: '审核状态',
+            dataIndex: 'pi_status',
             width: 120
         },{
-            text: '采购单号',
-            dataIndex: 'pd_ordercode',
+            text: '客户编号',
+            dataIndex: 'pi_custcode',
             width: 120
         },{
-            text: '采购序号',
-            dataIndex: 'pd_orderdetno',
-            xtype:'numbercolumn',
+            text: '客户名称',
+            dataIndex: 'pi_custname',
             width: 120
         },{
             text: '物料编号',
             dataIndex: 'pd_prodcode',
             width: 120
         },{
-            text: '验收数量',
+            text: '物料名称',
+            dataIndex: 'pr_detail',
+            width: 120
+        },{
+            text: '物料规格',
+            dataIndex: 'pr_spec',
+            width: 120
+        },{
+            text: '单位',
+            dataIndex: 'pr_unit',
+            width: 120
+        },{
+            text: '数量',
             dataIndex: 'pd_inqty',
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '采购单价',
-            dataIndex: 'pd_orderprice',
-            xtype:'numbercolumn',
+            text: '仓库',
+            dataIndex: 'pd_whname',
             width: 120
         },{
-            text: '金额',
-            dataIndex: 'pd_total',
+            text: '单位成本',
+            dataIndex: 'pd_orderprice',
             xtype:'numbercolumn',
             width: 120
         },{
@@ -181,10 +186,15 @@ Ext.define('saas.view.stock.otherIn.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '成本单价',
-            dataIndex: 'pd_price',
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '相关单号',
+            dataIndex: 'pd_ordercode',
             xtype:'numbercolumn',
-            width: 120,
+            width: 120
         }]
     }
 });

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

@@ -90,6 +90,8 @@ Ext.define('saas.view.stock.otherIn.QueryPanelController', {
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         dbfinds:[{
+                            from:'pr_detail',to:'pr_detail',
+                        },{
                             from:'pr_code',to:'pd_prodcode',
                         }, {
                             from:'pr_detail',to:'pr_detail'
@@ -101,7 +103,7 @@ Ext.define('saas.view.stock.otherIn.QueryPanelController', {
                         }],
                         defaultCondition: "pr_statuscode='OPEN'",
                         dbSearchFields:[{
-                            emptyText:'输入物料编号、名称或规格',
+                            emptyText:'输入物料编号或名称',
                             xtype : "textfield", 
                             name : "search", 
                             width: 200,
@@ -179,7 +181,83 @@ Ext.define('saas.view.stock.otherIn.QueryPanelController', {
                     }) ;   
 
                 }
-            }
+            },
+            'dbfindtrigger[name=pi_custname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        addXtype: 'document-customer-formpanel',
+                        addTitle: '客户资料',
+                        dataUrl: '/api/document/customer/list',
+                        // dataUrl:'http://localhost:9480/customer/list',
+                        dbfinds: [{
+                            from: 'id',to: 'pi_custid',ignore:true
+                        }, {
+                            from: 'cu_code',to: 'pi_custcode'
+                        }, {
+                            from: 'cu_name',to: 'pi_custname'
+                        }],
+                        dbtpls: [{
+                            field: 'cu_code',
+                            width: 100
+                        }, {
+                            field: 'cu_name',
+                            width: 100
+                        }],
+                        defaultCondition:"cu_statuscode='OPEN'",
+                        //放大镜窗口字段
+                        dbSearchFields:[{
+                            emptyText:'输入客户编号或名称',
+                            xtype : "textfield", 
+                            name : "cu_name", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "(upper(cu_name) like '%"+v.toUpperCase()+"%' or upper(cu_code) like '%"+v.toUpperCase()+"%')";
+                            }
+                        }],
+                        dbColumns:[{
+                            "text": "客户ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        },{
+                            "text": "客户编号",
+                            "dataIndex": "cu_code",
+                            "width": 200,
+                        }, {
+                            "text": "客户名称",
+                            "dataIndex": "cu_name",
+                            "width": 200
+                        },{
+                            "text": "客户类型",
+                            "dataIndex": "cu_name",
+                            "width": 100
+                        },{
+                            "text": "业务员",
+                            "dataIndex": "cu_sellername",
+                            "width": 100
+                        },{
+                            "text": "税率",
+                            "dataIndex": "cu_taxrate",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        },{
+                            "text": "承付天数",
+                            "dataIndex": "cu_promisedays",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        },{
+                            "text": "额度",
+                            "dataIndex": "cu_credit",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        }]
+                    });
+
+                }
+            },            
         });
 
     }

+ 0 - 17
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -47,23 +47,6 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
         readOnly: true,
         allowBlank: true,
         columnWidth: 0.25
-    }, {
-        xtype: "hidden",
-        name: "pi_vendid",
-        bind: "{pi_vendid}",
-        fieldLabel: "供应商ID",
-        allowBlank: true,
-        columnWidth: 0.0
-    }, {
-        xtype: 'hidden',
-        name: 'pi_vendcode',
-        bind: '{pi_vendcode}',
-        fieldLabel: '供应商编号'
-    }, {
-        xtype: 'dbfindtrigger',
-        name: 'pi_vendname',
-        bind: '{pi_vendname}',
-        fieldLabel: '供应商名称'
     }, {
         xtype: "hidden",
         name: "pi_custid",

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

@@ -30,17 +30,15 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         columnWidth: 0.5
     }, {
         xtype: 'textfield',
-        name: 'pi_vendcode',
-        bind: '{pi_vendcode}',
-        fieldLabel: '供应商编号',
+        name: 'pi_custcode',
+        fieldLabel: '客户编号',
         allowBlank: true,
         hidden:true,
         columnWidth: 0.25
     }, {
         xtype: 'dbfindtrigger',
-        name: 'pi_vendname',
-        bind: '{pi_vendname}',
-        fieldLabel: '供应商名称',
+        name: 'pi_custname',
+        fieldLabel: '客户名称',
         allowBlank: true,
         columnWidth: 0.25
     }, {
@@ -130,51 +128,56 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
         relativeColumn: [{
             text: 'id',
             dataIndex: 'pu_id',
-            width: 0,
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            hidden:true
         }, {
             text: '单据编号',
-            dataIndex: 'pd_inoutno',
+            dataIndex: 'pi_inoutno',
             width: 200
         }, {
-            text: '审核状态',
-            dataIndex: 'pi_status',
-            width: 120
-        }, {
-            text: '单据日期',
-            dataIndex: 'pi_date',
-            xtype:'datecolumn',
+            text: '单据类型',
+            dataIndex: 'pd_piclass',
             width: 200
         },{
-            text: '供应商名称',
-            dataIndex: 'pi_vendname',
+            text: '审核状态',
+            dataIndex: 'pi_status',
             width: 120
         },{
-            text: '采购单号',
-            dataIndex: 'pd_ordercode',
+            text: '客户编号',
+            dataIndex: 'pi_custcode',
             width: 120
         },{
-            text: '采购序号',
-            dataIndex: 'pd_orderdetno',
-            xtype:'numbercolumn',
+            text: '客户名称',
+            dataIndex: 'pi_custname',
             width: 120
         },{
             text: '物料编号',
             dataIndex: 'pd_prodcode',
             width: 120
         },{
-            text: '验收数量',
+            text: '物料名称',
+            dataIndex: 'pr_detail',
+            width: 120
+        },{
+            text: '物料规格',
+            dataIndex: 'pr_spec',
+            width: 120
+        },{
+            text: '单位',
+            dataIndex: 'pr_unit',
+            width: 120
+        },{
+            text: '数量',
             dataIndex: 'pd_inqty',
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '采购单价',
-            dataIndex: 'pd_orderprice',
-            xtype:'numbercolumn',
+            text: '仓库',
+            dataIndex: 'pd_whname',
             width: 120
         },{
-            text: '金额',
-            dataIndex: 'pd_total',
+            text: '单位成本',
+            dataIndex: 'pd_orderprice',
             xtype:'numbercolumn',
             width: 120
         },{
@@ -183,10 +186,15 @@ Ext.define('saas.view.stock.otherOut.QueryPanel', {
             xtype:'numbercolumn',
             width: 120
         },{
-            text: '成本单价',
-            dataIndex: 'pd_price',
+            text: '金额',
+            dataIndex: 'pd_total',
+            xtype:'numbercolumn',
+            width: 120
+        },{
+            text: '相关单号',
+            dataIndex: 'pd_ordercode',
             xtype:'numbercolumn',
-            width: 120,
+            width: 120
         }]
     }
 });

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

@@ -90,6 +90,8 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         dbfinds:[{
+                            from:'pr_detail',to:'pr_detail',
+                        },{
                             from:'pr_code',to:'pd_prodcode',
                         }, {
                             from:'pr_detail',to:'pr_detail'
@@ -101,7 +103,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                         }],
                         defaultCondition: "pr_statuscode='OPEN'",
                         dbSearchFields:[{
-                            emptyText:'输入物料编号、名称或规格',
+                            emptyText:'输入物料编号或名称',
                             xtype : "textfield", 
                             name : "search", 
                             width: 200,
@@ -179,7 +181,83 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                     }) ;   
 
                 }
-            }
+            },
+            'dbfindtrigger[name=pi_custname]': {
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        addXtype: 'document-customer-formpanel',
+                        addTitle: '客户资料',
+                        dataUrl: '/api/document/customer/list',
+                        // dataUrl:'http://localhost:9480/customer/list',
+                        dbfinds: [{
+                            from: 'id',to: 'pi_custid',ignore:true
+                        }, {
+                            from: 'cu_code',to: 'pi_custcode'
+                        }, {
+                            from: 'cu_name',to: 'pi_custname'
+                        }],
+                        dbtpls: [{
+                            field: 'cu_code',
+                            width: 100
+                        }, {
+                            field: 'cu_name',
+                            width: 100
+                        }],
+                        defaultCondition:"cu_statuscode='OPEN'",
+                        //放大镜窗口字段
+                        dbSearchFields:[{
+                            emptyText:'输入客户编号或名称',
+                            xtype : "textfield", 
+                            name : "cu_name", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "(upper(cu_name) like '%"+v.toUpperCase()+"%' or upper(cu_code) like '%"+v.toUpperCase()+"%')";
+                            }
+                        }],
+                        dbColumns:[{
+                            "text": "客户ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        },{
+                            "text": "客户编号",
+                            "dataIndex": "cu_code",
+                            "width": 200,
+                        }, {
+                            "text": "客户名称",
+                            "dataIndex": "cu_name",
+                            "width": 200
+                        },{
+                            "text": "客户类型",
+                            "dataIndex": "cu_name",
+                            "width": 100
+                        },{
+                            "text": "业务员",
+                            "dataIndex": "cu_sellername",
+                            "width": 100
+                        },{
+                            "text": "税率",
+                            "dataIndex": "cu_taxrate",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        },{
+                            "text": "承付天数",
+                            "dataIndex": "cu_promisedays",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        },{
+                            "text": "额度",
+                            "dataIndex": "cu_credit",
+                            "width": 100,
+                            xtype: 'numbercolumn',
+                            align:'end'
+                        }]
+                    });
+
+                }
+            },             
         });
 
     }

+ 1 - 4
frontend/saas-web/app/view/stock/report/ProdinoutCount.js

@@ -24,12 +24,9 @@ Ext.define('saas.view.stock.report.ProdinoutCount', {
         fieldLabel: '物料编号',
         columnWidth: 0.2
     }, {
-        //xtype: 'datefield',
-        xtype: 'textfield',
+        xtype: 'monthdatefield',
         name: 'pwm_yearmonth',
         fieldLabel: '单据日期',
-        format: 'YYYYMM',
-       // defaultValue: new Date(),
         columnWidth: 0.2
     }],
     reportColumns: [{