Explorar el Código

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

chenw hace 7 años
padre
commit
bcde1a9077
Se han modificado 99 ficheros con 1808 adiciones y 677 borrados
  1. 10 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Operation.java
  2. 1 0
      applications/commons/commons-server/src/main/resources/i18n/messages_zh_CN.properties
  3. 2 2
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalancedetMapper.java
  4. 1 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalancedetailMapper.java
  5. 5 5
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedetail.java
  6. 3 3
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/PaybalanceServiceImpl.java
  7. 1 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  8. 18 18
      applications/money/money-server/src/main/resources/mapper/PaybalancedetMapper.xml
  9. 10 10
      applications/money/money-server/src/main/resources/mapper/PaybalancedetailMapper.xml
  10. 1 1
      applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml
  11. 4 4
      applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml
  12. 12 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java
  13. 2 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdIODetailMapper.java
  14. 4 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/ProdInOutService.java
  15. 4 5
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/PurchaseService.java
  16. 15 6
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  17. 58 5
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  18. 25 12
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  19. 1 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  20. 4 3
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml
  21. 4 0
      base-servers/account/account-server/pom.xml
  22. 2 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/AccountApplication.java
  23. 18 1
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/AccountController.java
  24. 4 2
      base-servers/account/account-server/src/main/resources/application.yml
  25. 8 1
      base-servers/auth/auth-client/src/main/java/com/usoftchina/saas/auth/client/configuration/AuthAutoConfiguration.java
  26. 8 6
      base-servers/auth/auth-client/src/main/java/com/usoftchina/saas/auth/client/interceptor/AuthRestInterceptor.java
  27. 0 1
      base-servers/ui-server/src/main/java/com/usoftchina/saas/ui/controller/co/CoViewController.java
  28. 0 3
      base-servers/ui-server/src/main/java/com/usoftchina/saas/ui/service/co/CoViewService.java
  29. 2 2
      frontend/saas-web/app/model/stock/Makematerial.js
  30. 0 1
      frontend/saas-web/app/util/BaseUtil.js
  31. 1 1
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  32. 1 1
      frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js
  33. 1 1
      frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js
  34. 13 9
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  35. 11 0
      frontend/saas-web/app/view/core/query/QueryGridPanel.scss
  36. 19 2
      frontend/saas-web/app/view/core/query/QueryPanel.js
  37. 15 0
      frontend/saas-web/app/view/document/customer/BasePanel.js
  38. 40 19
      frontend/saas-web/app/view/document/kind/ChildForm.js
  39. 2 2
      frontend/saas-web/app/view/document/kind/Kind.js
  40. 17 2
      frontend/saas-web/app/view/document/product/BasePanel.js
  41. 13 12
      frontend/saas-web/app/view/document/product/FormController.js
  42. 45 9
      frontend/saas-web/app/view/document/product/FormPanel.js
  43. 2 1
      frontend/saas-web/app/view/main/Navigation.scss
  44. 16 6
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  45. 18 0
      frontend/saas-web/app/view/money/fundtransfer/FormPanelController.js
  46. 7 2
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  47. 18 21
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  48. 2 2
      frontend/saas-web/app/view/money/othreceipts/FormPanelController.js
  49. 0 1
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  50. 36 18
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  51. 12 1
      frontend/saas-web/app/view/money/othspendings/FormPanelController.js
  52. 7 2
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  53. 12 1
      frontend/saas-web/app/view/money/othspendings/QueryPanelController.js
  54. 83 11
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  55. 8 6
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  56. 27 7
      frontend/saas-web/app/view/money/payBalance/QueryPanelController.js
  57. 120 39
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  58. 10 7
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  59. 8 5
      frontend/saas-web/app/view/money/recBalance/QueryPanel.js
  60. 27 7
      frontend/saas-web/app/view/money/recBalance/QueryPanelController.js
  61. 93 29
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  62. 12 12
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  63. 0 1
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  64. 27 7
      frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js
  65. 76 21
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  66. 17 20
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  67. 27 7
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js
  68. 2 1
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  69. 18 21
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  70. 27 7
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js
  71. 87 28
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  72. 14 5
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  73. 13 4
      frontend/saas-web/app/view/sale/sale/QueryPanelController.js
  74. 67 18
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  75. 14 5
      frontend/saas-web/app/view/sale/saleIn/FormPanelController.js
  76. 13 4
      frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js
  77. 65 21
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  78. 14 5
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  79. 17 8
      frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js
  80. 16 6
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js
  81. 20 25
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js
  82. 28 1
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanelController.js
  83. 17 7
      frontend/saas-web/app/view/stock/make/FormPanel.js
  84. 25 20
      frontend/saas-web/app/view/stock/make/FormPanelController.js
  85. 25 2
      frontend/saas-web/app/view/stock/make/QueryPanelController.js
  86. 68 22
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  87. 19 21
      frontend/saas-web/app/view/stock/otherIn/FormPanelController.js
  88. 25 2
      frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js
  89. 74 22
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  90. 14 16
      frontend/saas-web/app/view/stock/otherOut/FormPanelController.js
  91. 14 2
      frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js
  92. 12 6
      frontend/saas-web/app/view/sys/config/FormPanel.js
  93. 2 2
      frontend/saas-web/app/view/sys/maxnumbers/DataList.js
  94. 2 2
      frontend/saas-web/app/view/sys/messagelog/DataList.js
  95. 5 3
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/field/Number.js
  96. 3 1
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/field/Text.js
  97. 10 0
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/window/MessageBox.js
  98. 7 0
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/window/Window.js
  99. 1 1
      frontend/saas-web/overrides/data/Connection.js

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

@@ -59,7 +59,16 @@ public enum Operation {
     /**
      * 反记账
      */
-    UNENDPRODUCT("msg.unEndProduct", "msg.unEndProductSuccess");
+    UNENDPRODUCT("msg.unEndProduct", "msg.unEndProductSuccess"),
+    /**
+     * 转出货单
+     */
+    TURNPRODOUT("msg.turnProdIO","msg.turnSuccess"),
+
+    /**
+     * 转销售验退单
+     */
+    TURNPRODOUTRETURN("msg.turnProdIOReturn","msg.turnSuccess");
 
     private final String title;
     private final String result;

+ 1 - 0
applications/commons/commons-server/src/main/resources/i18n/messages_zh_CN.properties

@@ -92,6 +92,7 @@ msg.turnARBill=\u5f00\u7968\u4f5c\u4e1a
 msg.turnNotify=\u8f6c\u901a\u77e5\u5355\u64cd\u4f5c
 msg.turnStorage=\u8f6c\u5165\u5e93
 msg.turnProdIO=\u8f6c\u51fa\u5e93\u5355\u64cd\u4f5c
+msg.turnProdIOReturn=\u8F6C\u9500\u552E\u9A8C\u9000\u5355
 msg.turnProdIO\!OtherOut=\u8f6c\u5176\u5b83\u51fa\u5e93\u5355\u64cd\u4f5c
 msg.turnProdIO\!OtherPurcOut=\u8f6c\u5176\u5b83\u91c7\u8d2d\u51fa\u5e93\u5355
 msg.turnSendNotify=\u8f6c\u53d1\u8d27\u901a\u77e5\u5355\u64cd\u4f5c

+ 2 - 2
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/PaybalancedetMapper.java

@@ -14,9 +14,9 @@ public interface PaybalancedetMapper {
 
     int insertSelective(Paybalancedet record);
 
-    Paybalancedet selectByPrimaryKey(Integer pdId);
+    List<Paybalancedet> selectByPrimaryKey(Integer pdId);
 
-    int updateByPrimaryKeySelective(List<Paybalancedet> record);
+    int updateByPrimaryKeySelective(Paybalancedet record);
 
     int updateByPrimaryKey(Paybalancedet record);
 

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

@@ -14,7 +14,7 @@ public interface PaybalancedetailMapper {
 
     int insertSelective(Paybalancedetail record);
 
-    Paybalancedetail selectByPrimaryKey(Integer pbdId);
+    List<Paybalancedetail> selectByPrimaryKey(Integer pbdId);
 
     int updateByPrimaryKeySelective(Paybalancedetail record);
 

+ 5 - 5
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalancedetail.java

@@ -13,7 +13,7 @@ public class Paybalancedetail extends CommonBaseEntity implements Serializable {
 
     private Integer pbd_ym;
 
-    private Integer pbd_sild;
+    private Integer pbd_slid;
 
     private String pbd_slcode;
 
@@ -63,12 +63,12 @@ public class Paybalancedetail extends CommonBaseEntity implements Serializable {
         this.pbd_ym = pbd_ym;
     }
 
-    public Integer getPbd_sild() {
-        return pbd_sild;
+    public Integer getPbd_slid() {
+        return pbd_slid;
     }
 
-    public void setPbd_sild(Integer pbd_sild) {
-        this.pbd_sild = pbd_sild;
+    public void setPbd_slid(Integer pbd_slid) {
+        this.pbd_slid = pbd_slid;
     }
 
     public String getPbd_slcode() {

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

@@ -70,7 +70,7 @@ public class PaybalanceServiceImpl implements PaybalanceService {
             paybalancedet1.setPd_rbid(Math.toIntExact(rbId));
             paybalancedet1.setCompanyId(BaseContextHolder.getCompanyId());
             if (paybalancedet1.getId() > 0 ){
-                paybalancedetMapper.updateByPrimaryKey(paybalancedet1);
+                paybalancedetMapper.updateByPrimaryKeySelective(paybalancedet1);
             }else {
                 paybalancedetMapper.insertSelective(paybalancedet1);
             }
@@ -135,8 +135,8 @@ public class PaybalanceServiceImpl implements PaybalanceService {
     public Pay select(int id){
         Pay pay = new Pay();
         pay.setMain(paybalanceMapper.selectByPrimaryKey(id));
-        pay.setItems1((List<Paybalancedet>) paybalancedetMapper.selectByPrimaryKey(id));
-        pay.setItems2((List<Paybalancedetail>) paybalancedetailMapper.selectByPrimaryKey(id));
+        pay.setItems1(paybalancedetMapper.selectByPrimaryKey(id));
+        pay.setItems2(paybalancedetailMapper.selectByPrimaryKey(id));
         return pay;
     }
 

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

@@ -56,7 +56,7 @@ public class RecbalanceServiceImpl implements RecbalanceService {
 
         Long rbId = recbalance.getId();
         if (rbId > 0){
-            recbalanceMapper.updateByPrimaryKey(recbalance);
+            recbalanceMapper.updateByPrimaryKeySelective(recbalance);
         }else {
             recbalance.setCompanyId(BaseContextHolder.getCompanyId());
             recbalanceMapper.insertSelective(recbalance);

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

@@ -2,25 +2,25 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.usoftchina.saas.money.mapper.PaybalancedetMapper" >
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.money.po.Paybalancedet" >
-    <id column="pd_id" property="pdId" jdbcType="INTEGER" />
-    <result column="pd_rbid" property="pdRbid" jdbcType="INTEGER" />
-    <result column="pd_detno" property="pdDetno" jdbcType="INTEGER" />
-    <result column="pd_ym" property="pdYm" jdbcType="INTEGER" />
-    <result column="pd_bankid" property="pdBankid" jdbcType="INTEGER" />
-    <result column="pd_bankcode" property="pdBankcode" jdbcType="VARCHAR" />
-    <result column="pd_bankname" property="pdBankname" jdbcType="VARCHAR" />
-    <result column="pd_amount" property="pdAmount" jdbcType="DOUBLE" />
-    <result column="pd_paymethod" property="pdPaymethod" jdbcType="VARCHAR" />
-    <result column="pd_paycode" property="pdPaycode" jdbcType="VARCHAR" />
-    <result column="pd_remark" property="pdRemark" jdbcType="VARCHAR" />
+    <id column="pd_id" property="id" jdbcType="INTEGER" />
+    <result column="pd_rbid" property="pd_rbid" jdbcType="INTEGER" />
+    <result column="pd_detno" property="pd_detno" jdbcType="INTEGER" />
+    <result column="pd_ym" property="pd_ym" jdbcType="INTEGER" />
+    <result column="pd_bankid" property="pd_bankid" jdbcType="INTEGER" />
+    <result column="pd_bankcode" property="pd_bankcode" jdbcType="VARCHAR" />
+    <result column="pd_bankname" property="pd_bankname" jdbcType="VARCHAR" />
+    <result column="pd_amount" property="pd_amount" jdbcType="DOUBLE" />
+    <result column="pd_paymethod" property="pd_paymethod" jdbcType="VARCHAR" />
+    <result column="pd_paycode" property="pd_paycode" jdbcType="VARCHAR" />
+    <result column="pd_remark" property="pd_remark" jdbcType="VARCHAR" />
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
-    <result column="updaterId" property="updaterid" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updatedate" property="updatedate" jdbcType="TIMESTAMP" />
-    <result column="pd_text1" property="pdText1" jdbcType="VARCHAR" />
-    <result column="pd_text2" property="pdText2" jdbcType="VARCHAR" />
-    <result column="pd_text3" property="pdText3" jdbcType="VARCHAR" />
-    <result column="pd_text4" property="pdText4" jdbcType="VARCHAR" />
-    <result column="pd_text5" property="pdText5" jdbcType="VARCHAR" />
+    <result column="pd_text1" property="pd_text1" jdbcType="VARCHAR" />
+    <result column="pd_text2" property="pd_text2" jdbcType="VARCHAR" />
+    <result column="pd_text3" property="pd_text3" jdbcType="VARCHAR" />
+    <result column="pd_text4" property="pd_text4" jdbcType="VARCHAR" />
+    <result column="pd_text5" property="pd_text5" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     pd_id, pd_rbid, pd_detno, pd_ym, pd_bankid, pd_bankcode, pd_bankname, pd_amount, 
@@ -31,7 +31,7 @@
     select 
     <include refid="Base_Column_List" />
     from paybalancedet
-    where pd_rbid = #{pdRbId,jdbcType=INTEGER}
+    where pd_rbid = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from paybalancedet

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

@@ -6,7 +6,7 @@
     <result column="pbd_pbid" property="pbd_pbid" jdbcType="INTEGER" />
     <result column="pbd_detno" property="pbd_detno" jdbcType="INTEGER" />
     <result column="pbd_ym" property="pbd_ym" jdbcType="INTEGER" />
-    <result column="pbd_sild" property="pbd_sild" jdbcType="INTEGER" />
+    <result column="pbd_slid" property="pbd_slid" jdbcType="INTEGER" />
     <result column="pbd_slcode" property="pbd_slcode" jdbcType="VARCHAR" />
     <result column="pbd_slkind" property="pbd_slkind" jdbcType="VARCHAR" />
     <result column="pbd_sldate" property="pbd_sldate" jdbcType="TIMESTAMP" />
@@ -23,7 +23,7 @@
     <result column="pbd_text5" property="pbd_text5" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
-    pbd_id, pbd_pbid, pbd_detno, pbd_ym, pbd_sild, pbd_slcode, pbd_slkind, pbd_sldate,
+    pbd_id, pbd_pbid, pbd_detno, pbd_ym, pbd_slid, pbd_slcode, pbd_slkind, pbd_sldate,
     pbd_amount, pbd_nowbalance, pbd_remark, companyId, updaterId, updatedate, pbd_text1,
     pbd_text2, pbd_text3, pbd_text4, pbd_text5
   </sql>
@@ -45,14 +45,14 @@
 
   <insert id="insert" parameterType="com.usoftchina.saas.money.po.Paybalancedetail" >
     insert into paybalancedetail (pbd_id, pbd_pbid, pbd_detno,
-      pbd_ym, pbd_sild, pbd_slcode,
+      pbd_ym, pbd_slid, pbd_slcode,
       pbd_slkind, pbd_sldate, pbd_amount,
       pbd_nowbalance, pbd_remark, companyId,
       updaterId, updatedate, pbd_text1,
       pbd_text2, pbd_text3, pbd_text4,
       pbd_text5)
     values (#{id,jdbcType=INTEGER}, #{pbd_pbid,jdbcType=INTEGER}, #{pbd_detno,jdbcType=INTEGER},
-      #{pbd_ym,jdbcType=INTEGER}, #{pbd_sild,jdbcType=INTEGER}, #{pbd_slcode,jdbcType=VARCHAR},
+      #{pbd_ym,jdbcType=INTEGER}, #{pbd_slid,jdbcType=INTEGER}, #{pbd_slcode,jdbcType=VARCHAR},
       #{pbd_slkind,jdbcType=VARCHAR}, #{pbd_sldate,jdbcType=TIMESTAMP}, #{pbd_amount,jdbcType=DOUBLE},
       #{pbd_nowbalance,jdbcType=DOUBLE}, #{pbd_remark,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER},
       #{updaterId,jdbcType=INTEGER}, #{updatedate,jdbcType=TIMESTAMP}, #{pbd_text1,jdbcType=VARCHAR},
@@ -71,8 +71,8 @@
       <if test="pbd_ym != null" >
         pbd_ym,
       </if>
-      <if test="pbd_sild != null" >
-        pbd_sild,
+      <if test="pbd_slid != null" >
+        pbd_slid,
       </if>
       <if test="pbd_slcode != null" >
         pbd_slcode,
@@ -127,8 +127,8 @@
       <if test="pbd_ym != null" >
         #{pbd_ym,jdbcType=INTEGER},
       </if>
-      <if test="pbd_sild != null" >
-        #{pbd_sild,jdbcType=INTEGER},
+      <if test="pbd_slid != null" >
+        #{pbd_slid,jdbcType=INTEGER},
       </if>
       <if test="pbd_slcode != null" >
         #{pbd_slcode,jdbcType=VARCHAR},
@@ -186,8 +186,8 @@
       <if test="pbd_ym != null" >
         pbd_ym = #{pbd_ym,jdbcType=INTEGER},
       </if>
-      <if test="pbd_sild != null" >
-        pbd_sild = #{pbd_sild,jdbcType=INTEGER},
+      <if test="pbd_slid != null" >
+        pbd_slid = #{pbd_slid,jdbcType=INTEGER},
       </if>
       <if test="pbd_slcode != null" >
         pbd_slcode = #{pbd_slcode,jdbcType=VARCHAR},

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

@@ -13,7 +13,7 @@
     <result column="rd_paymethod" jdbcType="VARCHAR" property="rd_paymethod" />
     <result column="rd_paycode" jdbcType="VARCHAR" property="rd_paycode" />
     <result column="rd_remark" jdbcType="VARCHAR" property="rd_remark" />
-    <result column="companyid" jdbcType="INTEGER" property="companyId" />
+    <result column="companyId" jdbcType="INTEGER" property="companyId" />
     <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
     <result column="updatedate" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="rd_text1" jdbcType="VARCHAR" property="rd_text1" />

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

@@ -13,7 +13,7 @@
     <result column="rbd_amount" property="rbd_amount" jdbcType="DOUBLE" />
     <result column="rbd_nowbalance" property="rbd_nowbalance" jdbcType="DOUBLE" />
     <result column="rbd_remark" property="rbd_remark" jdbcType="VARCHAR" />
-    <result column="companyid" property="companyId" jdbcType="INTEGER" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updatedate" property="updatedate" jdbcType="TIMESTAMP" />
     <result column="rbd_text1" property="rbd_text1" jdbcType="VARCHAR" />
@@ -93,7 +93,7 @@
         rbd_remark,
       </if>
       <if test="companyId != null" >
-        companyid,
+        companyId,
       </if>
       <if test="updaterId != null" >
         updaterId,
@@ -207,8 +207,8 @@
       <if test="rbd_remark != null" >
         rbd_remark = #{rbd_remark,jdbcType=VARCHAR},
       </if>
-      <if test="companyid != null" >
-        companyid = #{companyid,jdbcType=INTEGER},
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
       </if>
       <if test="updaterId != null" >
         updaterId = #{updaterId,jdbcType=INTEGER},

+ 12 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java

@@ -153,12 +153,24 @@ public class PurchaseController {
         return Result.success();
     }
 
+    @PostMapping("/batchClose")
+    public Result batchClose(@RequestBody BatchDealBaseDTO baseDTOs) {
+        purchaseService.batchClose(baseDTOs);
+        return Result.success();
+    }
+
     @PostMapping("/open/{id}")
     public Result openPurchase(@PathVariable(value = "id") long id){
          purchaseService.openPurchase(id);
         return Result.success();
     }
 
+    @PostMapping("/batchOpen")
+    public Result batchOpen(@RequestBody BatchDealBaseDTO baseDTOs) {
+        purchaseService.batchOpen(baseDTOs);
+        return Result.success();
+    }
+
     @PostMapping("/turnProdin/{id}")
     public Result turnProdin(@PathVariable("id") Long id){
         return purchaseService.turnProdin(id);

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

@@ -31,7 +31,7 @@ public interface ProdIODetailMapper extends CommonBaseMapper<ProdIODetail> {
 
     void deleteByFK(Long id);
 
-    void calcProdIn(@Param("pi_id") Long pi_id,@Param("pi_class") String pi_class);
+    void calcProdIn(@Param("pi_id") Long pi_id);
 
-    void calcProdOut(@Param("pi_id") Long pi_id,@Param("pi_class") String pi_class);
+    void calcProdOut(@Param("pi_id") Long pi_id);
 }

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

@@ -73,4 +73,8 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
     DocBaseDTO open(long id);
 
     void batchOpen(BatchDealBaseDTO baseDTOs);
+
+
+    void calcProdInout(Long pi_id, String pi_class);
+
 }

+ 4 - 5
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/PurchaseService.java

@@ -3,15 +3,11 @@ package com.usoftchina.saas.purchase.service;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.base.service.CommonBaseService;
-
-
 import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
-import com.usoftchina.saas.commons.dto.DocSavedDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.purchase.dto.PurchaseFormDTO;
-import com.usoftchina.saas.purchase.dto.PurchaseReqDTO;
 import com.usoftchina.saas.purchase.mapper.PurchaseMapper;
 import com.usoftchina.saas.purchase.po.Purchase;
 import com.usoftchina.saas.purchase.po.PurchaseList;
@@ -121,19 +117,22 @@ public interface PurchaseService extends CommonBaseService<PurchaseMapper, Purch
      */
     void closePurchase(long id);
 
+    void batchClose(BatchDealBaseDTO baseDTOs);
+
     /**
      * 采购单恢复
      * @param id
      */
     void openPurchase(long id);
 
+    void batchOpen(BatchDealBaseDTO baseDTOs);
 
     /**
      * 转采购验收单
      * @param id
      * @return
      */
-    public Result turnProdin(Long id);
+    Result turnProdin(Long id);
 
 
 }

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

@@ -350,17 +350,17 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
     }
 
 
-    private void calcProdInout(Long pi_id, String pi_class) {
+    public void calcProdInout(Long pi_id, String pi_class) {
         if ("采购验收单".equals(pi_class)) {
-            prodIODetailMapper.calcProdIn(pi_id,pi_class);
+            prodIODetailMapper.calcProdIn(pi_id);
         } else if ("采购验退单".equals(pi_class)) {
-            prodIODetailMapper.calcProdOut(pi_id,pi_class);
+            prodIODetailMapper.calcProdOut(pi_id);
         }
     }
 
 
 
-    private void updateYqty(ProdInOut prodInOut) {
+    public void updateYqty(ProdInOut prodInOut) {
         //更新已转数
         if ("采购验收单".equals(prodInOut.getPi_class())){
             purchasedetailMapper.updatePurchaseYqty(prodInOut.getPi_puid());
@@ -401,11 +401,14 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         targetPi.setPi_pucode(sourcePi.getPi_pucode());
         //设置公司id
         targetPi.setCompanyId(sourcePi.getCompanyId());
+        targetPi.setCreateTime(new Date());
+
+
         //保存数据
         getMapper().insertSelective(targetPi);
         //插入验退单从表
         long pi_id = targetPi.getId();
-         for (int i = 0;i<sourcePids.size();i++){
+        for (int i = 0;i<sourcePids.size();i++){
              ProdIODetail sourcePid = sourcePids.get(i);
              ProdIODetail targetPid = new ProdIODetail();
              pdInqty = sourcePid.getPd_inqty()==null?0:sourcePid.getPd_inqty();
@@ -415,7 +418,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                  targetPid.setPd_piid(pi_id);
                  targetPid.setPd_inoutno(piInoutno);
                  targetPid.setPd_piclass(BillCodeSeq.PURCHASEOUT.getName());
-                 targetPid.setPd_pdno(i);
+                 targetPid.setPd_pdno(i+1);
                  targetPid.setPd_orderid(sourcePid.getPd_orderid());
                  targetPid.setPd_ordercode(sourcePid.getPd_ordercode());
                  targetPid.setPd_orderdetno(sourcePid.getPd_orderdetno());
@@ -423,8 +426,11 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                  targetPid.setPd_prodid(sourcePid.getPd_prodid());
                  targetPid.setPd_prodcode(sourcePid.getPd_prodcode());
                  targetPid.setPd_ioid(sourcePid.getId());
+                 targetPid.setPd_taxrate(sourcePid.getPd_taxrate());
                  //公司id
                  targetPid.setCompanyId(sourcePid.getCompanyId());
+                 targetPid.setCreateTime(new Date());
+
                  //本次转单数
                  targetPid.setPd_outqty(pdInqty-pdYqty);
                  prodIODetailMapper.insertSelective(targetPid);
@@ -433,6 +439,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                  prodIODetailMapper.updateByPrimaryKeySelective(sourcePid);
              }
          }
+
+        //采购验退单相关计算
+        calcProdInout(pi_id,"采购验退单");
         DocBaseDTO baseDTO = new DocBaseDTO();
         baseDTO.setId(pi_id);
         baseDTO.setCode(piInoutno);

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

@@ -21,6 +21,7 @@ import com.usoftchina.saas.purchase.dto.PurchaseDetailDTO;
 import com.usoftchina.saas.purchase.dto.PurchaseFormDTO;
 import com.usoftchina.saas.purchase.mapper.*;
 import com.usoftchina.saas.purchase.po.*;
+import com.usoftchina.saas.purchase.service.ProdInOutService;
 import com.usoftchina.saas.purchase.service.PurchaseService;
 import com.usoftchina.saas.utils.BeanMapper;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -56,6 +57,10 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     private ProdIODetailMapper prodIODetailMapper;
     @Autowired
     private MessageLogService messageLogService;
+    @Autowired
+    private ProdInOutService prodInOutService;
+
+
 
     @Override
     public PageInfo<PurchaseList> getListData(PageRequest page, ListReqDTO req) {
@@ -270,7 +275,17 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     @Override
-    public void closePurchase(long id) {
+    public void batchClose(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0) {
+            return;
+        }
+        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
+            singleClose(base.getId());
+        }
+    }
+
+    private DocBaseDTO singleClose(Long id) {
         Purchase purchase = purchaseMapper.selectByPrimaryKey(id);
         if(Status.CLOSE.name().equals(purchase.getPu_statuscode())){
             throw new BizException(BizExceptionCode.BIZ_CLOSE);
@@ -283,11 +298,29 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
         //日志
         messageLogService.close(docBaseDTO);
+        return docBaseDTO;
     }
 
+
     @Override
-    public void openPurchase(long id) {
+    public void closePurchase(long id) {
+        singleClose(id);
+    }
+
+    @Override
+    public void batchOpen(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0) {
+            return;
+        }
+        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
+            singleOpen(base.getId());
+        }
+    }
+
+    private DocBaseDTO singleOpen(Long id) {
         Purchase purchase = purchaseMapper.selectByPrimaryKey(id);
+        DocBaseDTO docBaseDTO = null;
         if(!Status.CLOSE.name().equals(purchase.getPu_acceptstatuscode())){
             throw new BizException(BizExceptionCode.BIZ_OPEN);
         }
@@ -318,15 +351,27 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                 purchase.setPu_acceptstatuscode(Status.TURNIN.name());
             }
             purchaseMapper.updateByPrimaryKeySelective(purchase);
-            DocBaseDTO docBaseDTO = getBaseDTOById(id);
+            docBaseDTO = getBaseDTOById(id);
             //日志
             messageLogService.open(docBaseDTO);
+            return docBaseDTO;
         }
+        return docBaseDTO;
+    }
+
+    @Override
+    public void openPurchase(long id) {
+        singleOpen(id);
     }
 
     @Override
     @Transactional
     public Result turnProdin(Long id) {
+        //公司ID
+        Long companyId = BaseContextHolder.getCompanyId();
+        //人员Id
+        Long userId = BaseContextHolder.getUserId();
+
         Purchase purchase = getMapper().selectByPrimaryKey(id);
 
         Integer count=0;
@@ -356,7 +401,6 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         ProdInOut prodInOut = new ProdInOut();
         //生成单号
         String piInoutno =maxnumberService.getMaxnumber(BillCodeSeq.PURCHASEIN.getCaller(),true).getData();
-
         prodInOut.setPi_inoutno(piInoutno);
         prodInOut.setPi_class("采购验收单");
         prodInOut.setPi_date(new Date());
@@ -368,6 +412,10 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         prodInOut.setPi_vendname(purchase.getPu_vendname());
         prodInOut.setPi_puid(purchase.getId().intValue());
         prodInOut.setPi_pucode(purchase.getPu_code());
+        prodInOut.setCompanyId(purchase.getCompanyId());
+        prodInOut.setCreateTime(new Date());
+
+
         //设置公司id
         prodInOut.setCompanyId(purchase.getCompanyId());
 
@@ -386,15 +434,18 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                 prodIODetail.setPd_piid(pi_id);
                 prodIODetail.setPd_inoutno(piInoutno);
                 prodIODetail.setPd_piclass("采购验收单");
-                prodIODetail.setPd_pdno(i);
+                prodIODetail.setPd_pdno(i+1);
                 prodIODetail.setPd_orderid(purchaseDetail.getId().intValue());
                 prodIODetail.setPd_ordercode(purchase.getPu_code());
                 prodIODetail.setPd_orderdetno(purchaseDetail.getPd_detno());
                 prodIODetail.setPd_orderprice(purchaseDetail.getPd_price());
                 prodIODetail.setPd_prodid(purchaseDetail.getPd_prodid());
                 prodIODetail.setPd_prodcode(purchaseDetail.getPd_prodcode());
+                prodIODetail.setPd_taxrate(purchaseDetail.getPd_taxrate());
                 //公司id
                 prodIODetail.setCompanyId(purchaseDetail.getCompanyId());
+                prodIODetail.setCreateTime(new Date());
+
                 //本次转单数
                 prodIODetail.setPd_inqty(pdQty-pdYqty);
                 prodIODetailMapper.insertSelective(prodIODetail);
@@ -403,6 +454,8 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
                 purchasedetailMapper.updateByPrimaryKeySelective(purchaseDetail);
             }
         }
+        //采购单相关计算
+        prodInOutService.calcProdInout(pi_id,"采购验收单");
         DocBaseDTO baseDTO = new DocBaseDTO();
         baseDTO.setId(pi_id);
         baseDTO.setCode(piInoutno);

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

@@ -11,6 +11,7 @@ import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.commons.exception.BizExceptionCode;
 import com.usoftchina.saas.commons.po.BillCodeSeq;
+import com.usoftchina.saas.commons.po.Operation;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.api.WarehouseApi;
@@ -166,7 +167,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         //更新明细金额等
         setTotal(prodInOutNow);
         //日志
-        messageLogService.update(baseDTO);
+       messageLogService.update(baseDTO);
         return baseDTO;
 
     }
@@ -191,7 +192,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         //更新明细金额等
         setTotal(prodInOut);
         //日志
-       messageLogService.deleteDetail(docBaseDTO);
+      messageLogService.deleteDetail(docBaseDTO);
     }
 
     @Override
@@ -203,7 +204,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         setTotal(prodInOut);
         DocBaseDTO docBaseDTO = getBaseDTOById(id,prodInOut.getPi_class(),prodInOut.getPi_inoutno());
         //日志
-        messageLogService.deleteDetail(docBaseDTO);
+       messageLogService.deleteDetail(docBaseDTO);
         return num;
     }
 
@@ -238,6 +239,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             singleAudit( formData.getMain());
         }
         baseDTO.setId(id);
+        baseDTO.setCode(formData.getMain().getPi_inoutno());
         return baseDTO;
     }
     private void singleAudit(ProdInOutDTO prodInOutDTO) {
@@ -251,18 +253,17 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         map.put("inoutNo",pi_inoutno);
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
-        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("companyId",BaseContextHolder.getCompanyId());
         map.put("result","");
         Result res = warehouseApi.post(map);
-        Object result =  res.getData();
-        System.out.println("result:"+result);
+        Object result = res.getData();
         if(!StringUtils.isEmpty(result)){
             throw new BizException(BizExceptionCode.SALEOUT_POST_ERROR.getCode(),result.toString());
         }else{
             //记录日志
             DocBaseDTO docBaseDTO = getBaseDTOById(prodInOutDTO.getId(),pi_class,pi_inoutno);
             //日志
-            messageLogService.audit(docBaseDTO);
+           messageLogService.audit(docBaseDTO);
         }
     }
     @Override
@@ -304,7 +305,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         map.put("inoutNo", pi_inoutno);
         map.put("class", pi_class);
         map.put("commitid",BaseContextHolder.getUserId());
-        map.put("companyid",BaseContextHolder.getCompanyId());
+        map.put("companyId",BaseContextHolder.getCompanyId());
         map.put("result","");
         Result res = warehouseApi.unPost(map);
         Object result =  res.getData();
@@ -374,6 +375,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         Integer count=0;
         double pdOutqty=0;
         double pdYqty=0;
+        double pdSendPrice = 0.0;
+        double pdTaxrate = 0.0;
         ProdInOut sourcePi = checkAndReturnOrder(id);
         List<ProdIODetail> sourceDetails =prodIODetailMapper.selectByFK(id);
         if (null == sourcePi || StringUtils.isEmpty(sourcePi.getPi_inoutno()) || sourceDetails.size() == 0) {
@@ -401,7 +404,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         //插入销售退货单主表
         ProdInOut targetPi = new ProdInOut();
         //生成单号
-        String piInoutno = maxnumberService.getMaxnumber(BillCodeSeq.SALEIN.getCaller(),true).getData();
+        String piInoutno  = maxnumberService.getMaxnumber(BillCodeSeq.SALEIN.getCaller(),true).getData();
+                //BillCodeSeq.SALEIN.getCaller()+Math.abs(Math.random()*100);
+
         //设置公司id
         targetPi.setCompanyId(sourcePi.getCompanyId());
         targetPi.setCreateTime(new Date());
@@ -430,6 +435,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             ProdIODetail targetPid = new ProdIODetail();
             pdOutqty = sourcePid.getPd_outqty()==null?0.0:sourcePid.getPd_outqty();
             pdYqty = sourcePid.getPd_yqty()==null?0.0:sourcePid.getPd_yqty();
+            pdSendPrice = sourcePid.getPd_sendprice()==null?0.0:sourcePid.getPd_sendprice();
+            pdTaxrate = sourcePid.getPd_taxrate()==null?0.0:sourcePid.getPd_taxrate();
             if(pdOutqty-pdYqty>0){
                 //公司id
                 targetPid.setCompanyId(sourcePid.getCompanyId());
@@ -443,7 +450,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 targetPid.setPd_orderdetno(sourcePid.getPd_orderdetno());
 
                 targetPid.setPd_sdid(sourcePid.getPd_sdid());
-                targetPid.setPd_sendprice(sourcePid.getPd_sendprice());
+                targetPid.setPd_sendprice(pdSendPrice);
+                targetPid.setPd_taxrate(pdTaxrate);
 
 
                 targetPid.setPd_prodid(sourcePid.getPd_prodid());
@@ -454,6 +462,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
 
                 //本次转单数
                 targetPid.setPd_inqty(pdOutqty-pdYqty);
+                targetPid.setPd_total((pdOutqty-pdYqty)*pdSendPrice);
+                targetPid.setPd_nettotal((pdOutqty-pdYqty)*(pdSendPrice/(1+pdTaxrate/100)));
                 prodIODetailMapper.insertSelective(targetPid);
                 //更新已转数
                 sourcePid.setPd_yqty(pdOutqty);
@@ -461,9 +471,12 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             }
         }
 
+        //更新明细金额等
+        setTotal(targetPi);
+
         //日志记录
-        DocBaseDTO baseDTO = new DocBaseDTO(pi_id, piInoutno, BillCodeSeq.SALEIN.getCaller());
-        //messageLogService.customizeLog(baseDTO, Operation.);
+        DocBaseDTO baseDTO = new DocBaseDTO(pi_id, piInoutno, BillCodeSeq.SALEIN.getName());
+        messageLogService.customizeLog(baseDTO, Operation.TURNPRODOUTRETURN);
         return baseDTO;
 
     }

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

@@ -476,7 +476,7 @@ public class SaleServiceImpl implements SaleService{
         prodIODetailMapper.updatePDSaleOut(pi_id);
         //日志记录
         DocBaseDTO baseDTO = new DocBaseDTO(pi_id, pi_inoutno, BillCodeSeq.SALEOUT.getName());
-        //messageLogService.customizeLog(baseDTO, Operation.);
+        messageLogService.customizeLog(baseDTO, Operation.TURNPRODOUT);
         return baseDTO;
     }
 

+ 4 - 3
applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -539,9 +539,10 @@
     </foreach>
   </select>
   <update id="updatePiTotal"  parameterType="long">
-   update ProdInOut SET
-   pi_total = round(IFNULL((SELECT sum(round(pd_total,2)) FROM ProdIODetail WHERE pd_piid=pi_id),0),2)
-   where pi_id = #{id}
+update ProdInOut SET
+		 pi_total = ( select IFNULL(sum(IFNULL(pd_total,0)),0) FROM ProdIODetail WHERE pd_piid=#{id}),
+		 pi_nettotal = ( select IFNULL(sum(IFNULL(pd_nettotal,0)),0) FROM ProdIODetail WHERE pd_piid=#{id})
+			where pi_id =#{id}
   </update>
 
 </mapper>

+ 4 - 0
base-servers/account/account-server/pom.xml

@@ -21,6 +21,10 @@
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>account-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>auth-client</artifactId>
+        </dependency>
         <!-- db -->
         <dependency>
             <groupId>mysql</groupId>

+ 2 - 0
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/AccountApplication.java

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.account;
 
+import com.usoftchina.saas.auth.client.EnableAuthClient;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -14,6 +15,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
 @EnableEurekaClient
 @EnableTransactionManagement
 @MapperScan(basePackages = "com.usoftchina.saas.account.mapper")
+@EnableAuthClient
 public class AccountApplication {
     public static void main(String[] args) {
         SpringApplication.run(AccountApplication.class, args);

+ 18 - 1
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/AccountController.java

@@ -1,6 +1,5 @@
 package com.usoftchina.saas.account.controller;
 
-import com.usoftchina.saas.account.cache.AccountCache;
 import com.usoftchina.saas.account.dto.AccountDTO;
 import com.usoftchina.saas.account.dto.AccountRegDTO;
 import com.usoftchina.saas.account.dto.CompanyBaseDTO;
@@ -11,6 +10,7 @@ import com.usoftchina.saas.account.service.AccountService;
 import com.usoftchina.saas.account.service.CompanyService;
 import com.usoftchina.saas.account.service.RoleService;
 import com.usoftchina.saas.account.vo.CompanyBaseVO;
+import com.usoftchina.saas.auth.client.annotation.IgnoreAuth;
 import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.exception.ExceptionCode;
@@ -48,6 +48,7 @@ public class AccountController {
      * @return
      */
     @PostMapping("/register")
+    @IgnoreAuth
     public Result register(@RequestBody AccountRegDTO accountRegDTO) {
         // 判断是否已注册
         Account account = accountService.findByUsername(accountRegDTO.getUsername());
@@ -80,6 +81,7 @@ public class AccountController {
      * @return
      */
     @GetMapping(value = "/pwd/check")
+    @IgnoreAuth
     public Result<AccountDTO> validByUsernameAndPwd(@RequestParam(value = "username") String username, @RequestParam(value = "password") String password) {
         Account account = getAccountByUsername(username);
         if (null == account) {
@@ -158,6 +160,21 @@ public class AccountController {
         return Result.success(getAccountDTO(account));
     }
 
+    /**
+     * 按当前登录用户查找账户
+     *
+     * @return
+     */
+    @GetMapping
+    public Result<AccountDTO> getAccountByAuthorization() {
+        Account account = accountService.findByPrimaryKey(BaseContextHolder.getUserId());
+        if (null == account) {
+            return Result.error(ExceptionCode.USER_NOT_EXIST);
+        }
+
+        return Result.success(getAccountDTO(account));
+    }
+
     /**
      * 按ID查找账户
      *

+ 4 - 2
base-servers/account/account-server/src/main/resources/application.yml

@@ -50,7 +50,7 @@ eureka:
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
 server:
   port: 8580
   tomcat:
@@ -63,4 +63,6 @@ info:
   spring-cloud-version: '@spring.cloud.version@'
 mybatis:
   type-aliases-package: com.usoftchina.saas.account.po,com.usoftchina.saas.account.vo
-  mapper-locations: classpath:mapper/*.xml
+  mapper-locations: classpath:mapper/*.xml
+auth:
+  public-key: auth/pub.key

+ 8 - 1
base-servers/auth/auth-client/src/main/java/com/usoftchina/saas/auth/client/configuration/AuthAutoConfiguration.java

@@ -4,13 +4,15 @@ import com.usoftchina.saas.auth.client.interceptor.AuthRestInterceptor;
 import com.usoftchina.saas.auth.client.interceptor.ServiceFeignInterceptor;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 /**
  * @author yingp
  * @date 2018/10/2
  */
 @Configuration
-public class AuthAutoConfiguration {
+public class AuthAutoConfiguration implements WebMvcConfigurer {
     @Bean
     public AuthConfig authConfig() {
         return new AuthConfig();
@@ -25,4 +27,9 @@ public class AuthAutoConfiguration {
     public ServiceFeignInterceptor serviceFeignInterceptor() {
         return new ServiceFeignInterceptor();
     }
+
+    @Override
+    public void addInterceptors(InterceptorRegistry registry) {
+        registry.addInterceptor(authRestInterceptor());
+    }
 }

+ 8 - 6
base-servers/auth/auth-client/src/main/java/com/usoftchina/saas/auth/client/interceptor/AuthRestInterceptor.java

@@ -37,12 +37,14 @@ public class AuthRestInterceptor extends HandlerInterceptorAdapter {
             return super.preHandle(request, response, handler);
         }
         String token = request.getHeader(authConfig.getAuthHeader());
-        JwtInfo infoFromToken = JwtHelper.getInfoFromToken(token, authConfig.getPublicKey());
-        BaseContextHolder.setAppId(infoFromToken.getAppId());
-        BaseContextHolder.setUserId(infoFromToken.getUserId());
-        BaseContextHolder.setCompanyId(infoFromToken.getCompanyId());
-        BaseContextHolder.setToken(token);
-        log.info("token={} \\r\\n userName={}", token, infoFromToken.getUserName());
+        if (null != token) {
+            JwtInfo infoFromToken = JwtHelper.getInfoFromToken(token, authConfig.getPublicKey());
+            BaseContextHolder.setAppId(infoFromToken.getAppId());
+            BaseContextHolder.setUserId(infoFromToken.getUserId());
+            BaseContextHolder.setCompanyId(infoFromToken.getCompanyId());
+            BaseContextHolder.setToken(token);
+            log.info("token={} \\r\\n userName={}", token, infoFromToken.getUserName());
+        }
         return super.preHandle(request, response, handler);
     }
 

+ 0 - 1
base-servers/ui-server/src/main/java/com/usoftchina/saas/ui/controller/co/CoViewController.java

@@ -1,7 +1,6 @@
 package com.usoftchina.saas.ui.controller.co;
 
 import com.usoftchina.saas.base.Result;
-import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.ui.service.ViewService;
 import com.usoftchina.saas.ui.service.co.CoViewService;
 import org.slf4j.Logger;

+ 0 - 3
base-servers/ui-server/src/main/java/com/usoftchina/saas/ui/service/co/CoViewService.java

@@ -2,11 +2,8 @@ package com.usoftchina.saas.ui.service.co;
 
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.ui.core.Const;
-import com.usoftchina.saas.ui.po.View;
 import com.usoftchina.saas.ui.po.co.CoView;
-import com.usoftchina.saas.ui.repository.ViewRepository;
 import com.usoftchina.saas.ui.repository.co.CoViewRepository;
-import com.usoftchina.saas.ui.service.ComponentService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.Cacheable;

+ 2 - 2
frontend/saas-web/app/model/stock/Makematerial.js

@@ -16,6 +16,6 @@ Ext.define('saas.model.stock.Makematerial', {
         { name: 'mm_qty', type: 'float' },
         { name: 'mm_amount', type: 'float' },
         { name: 'mm_repprodcode', type: 'string' },
-        { name: 'mm_remark', type: 'string' }
-        ]
+        { name: 'mm_remark', type: 'string' }],
+    associations: [{ type: 'hasOne', model: 'saas.model.document.ProductDTO', associationKey: 'ProductDTO'}]        
 });

+ 0 - 1
frontend/saas-web/app/util/BaseUtil.js

@@ -11,7 +11,6 @@ Ext.define('saas.util.BaseUtil', {
             method = config.method || 'GET',
             timeout = config.timeout || 8000,
             defaultHeaders = {
-                'Authorization': ' ',
                 'Access-Control-Allow-Origin': '*',
                 "Content-Type": 'application/json;charset=UTF-8' 
             };

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

@@ -129,7 +129,7 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
             modal:true,
             height: height * 0.8,
             width: width * 0.8,
-            title: '查找',
+            title: '查找' + f.addTitle,
             scrollable: true,
             bodyPadding: 10,
             constrain: true,

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

@@ -23,7 +23,7 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
                     var selectRecordArr = selModel.view.ownerCt.selectRecordArr;
                     var index = -1;
                     index = selectRecordArr.findIndex(function(f){
-                        return f.id==id
+                        return f.id==record.id
                     });
                     if(index>-1){
                         selectRecordArr.splice(index,1);

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

@@ -117,7 +117,7 @@ Ext.define('saas.view.core.dbfind.MultiDbfindTrigger', {
             modal:true,
             height: '80%',
             width: '80%',
-            title: '查找',
+            title: '查找' + f.addTitle,
             scrollable: true,
             bodyPadding: 10,
             constrain: true,

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

@@ -2,6 +2,8 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
     extend: 'Ext.grid.Panel',
     xtype: 'core-query-querygridpanel',
 
+    cls: 'x-core-query',
+
     //工具类
     BaseUtil: Ext.create('saas.util.BaseUtil'),
     //字段属性
@@ -210,15 +212,17 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
         me.callParent(arguments);
     },
     listeners: {
-        itemdblClick: function (tableView, record, item, index, e, eOpts) {
-            var grid = tableView.up('grid'),
-            idValue = record.get(grid.idField),
-            codeValue = record.get(grid.codeField),
-            id = grid.addXtype + '-' + idValue;
-            openTab(grid.addXtype, grid.addTitle+"("+codeValue+")", id, {
-                initId: idValue
-            });
-        }
+        itemClick: function(tableView, record, item, index, e, eOpts) {
+            if(e.target.parentElement.classList.contains('x-querygrid-code-column')) {
+                var grid = tableView.up('grid'),
+                idValue = record.get(grid.idField),
+                codeValue = record.get(grid.codeField),
+                id = grid.addXtype + '-' + idValue;
+                openTab(grid.addXtype, grid.addTitle+"("+codeValue+")", id, {
+                    initId: idValue
+                });
+            }
+        },
     },
     getFields: function() {
         var me = this;

+ 11 - 0
frontend/saas-web/app/view/core/query/QueryGridPanel.scss

@@ -0,0 +1,11 @@
+.x-core-query {
+
+    .x-querygrid-code-column {
+
+        .x-grid-cell-inner {
+            text-decoration: underline;
+            color: blue;
+            cursor: pointer;
+        }
+    }
+}

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

@@ -92,8 +92,25 @@ Ext.define('saas.view.core.query.QueryPanel', {
 
     setQuertGridConfigs: function() {
         var me = this,
-        queryGrid = me.items[1];
-        me.queryGridConfig['columns']=me.queryGridConfig.baseColumn || [];
+        queryGrid = me.items[1],
+        queryGridConfig = me.queryGridConfig;
+        
+        var columns = queryGridConfig.baseColumn || [];
+
+        Ext.Array.each(columns, function(c) {
+            if(c.xtype == 'numbercolumn') {
+                Ext.applyIf(c, {
+                    align: 'end'
+                });
+            }
+            if(c.dataIndex == queryGridConfig.codeField) {
+                Ext.applyIf(c, {
+                    tdCls: 'x-querygrid-code-column'
+                });
+            }
+        });
+
+        me.queryGridConfig['columns']=columns;
         Ext.apply(queryGrid,me.queryGridConfig);
     },
 

+ 15 - 0
frontend/saas-web/app/view/document/customer/BasePanel.js

@@ -13,6 +13,21 @@ Ext.define('saas.view.document.customer.BasePanel', {
         name : "cu_type", 
         emptyText : "请选择客户类型", 
         columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "cu_name", 
+        emptyText : "客户名称", 
+        columnWidth : 0.25,
+    },{
+        xtype : "textfield", 
+        name : "cu_code", 
+        emptyText : "客户编号", 
+        columnWidth : 0.25,
+    },{
+        labelAlign:'left',
+        fieldLabel : "显示不启用", 
+        xtype:"checkbox",
+        name:"cu_statuscode"
     }],
 
     //字段属性

+ 40 - 19
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -35,7 +35,8 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 name:'ck_name',
                 allowBlank:false,
-                fieldLabel:'客户类型'
+                fieldLabel:'客户类型',
+                maxLength: 20
             }]
         },
         vendorkind:{
@@ -46,7 +47,8 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 name:'vk_name',
                 allowBlank:false,
-                fieldLabel:'供应商类型'
+                fieldLabel:'供应商类型',
+                maxLength: 20
             }]
         },
         productkind:{
@@ -57,7 +59,8 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 name:'pt_name',
                 allowBlank:false,
-                fieldLabel:'物料类型'
+                fieldLabel:'物料类型',
+                maxLength: 20
             }]
         },
         bankinformation:{
@@ -68,22 +71,24 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 name:'bk_bankname',
                 allowBlank:false,
-                fieldLabel:'账户名称'
+                fieldLabel:'账户名称',
+                maxLength: 20
             },{
                 xtype:'textfield',
                 name:'bk_bankcode',
                 allowBlank:false,
-                fieldLabel:'账户编号'
+                fieldLabel:'账户编号',
+                maxLength: 20
             },{
                 xtype:'numberfield',
                 name:'bk_beginamount',
                 allowBlank:false,
-                fieldLabel:'期初金额'
+                fieldLabel:'期初金额',
             },{
                 xtype:'numberfield',
                 name:'bk_thisamount',
                 allowBlank:false,
-                fieldLabel:'当前金额'
+                fieldLabel:'当前金额',
             }]
         },
         productbrand:{
@@ -94,7 +99,8 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 name:'pb_name',
                 allowBlank:false,
-                fieldLabel:'物料品牌'
+                fieldLabel:'物料品牌',
+                maxLength: 20
             }]
         },  
         productunit:{
@@ -105,7 +111,8 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 name:'pu_name',
                 allowBlank:false,
-                fieldLabel:'计量单位'
+                fieldLabel:'计量单位',
+                maxLength: 20
             }]
         },
         inoutkind:{
@@ -116,7 +123,8 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 name:'ft_name',
                 allowBlank:false,
-                fieldLabel:'类型'
+                fieldLabel:'类型',
+                maxLength: 20
             }]
         },
         address:{
@@ -127,7 +135,8 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 name:'ad_address',
                 allowBlank:false,
-                fieldLabel:'地址详情'
+                fieldLabel:'地址详情',
+                maxLength: 200
             }]
         },
         warehouse:{
@@ -138,23 +147,27 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 xtype:'textfield',
                 fieldLabel: '仓库编号',
                 name: 'wh_code',
-                allowBlank:false
+                allowBlank:false,
+                maxLength: 20
             },{
                 xtype:'textfield',
                 fieldLabel: '仓库名称',
                 name: 'wh_description',
-                allowBlank:false    
+                allowBlank:false,
+                maxLength: 20
             },{
                 xtype:'textfield',
                 fieldLabel: '仓库类型',
                 name: 'wh_type',
-                allowBlank:false    
+                allowBlank:false,
+                maxLength: 20 
             },{
                 readOnly:true,
                 xtype:'textfield',
                 fieldLabel: '仓库状态',
                 name: 'wh_status',   
-                value:'已开启'
+                value:'已开启',
+                maxLength: 20
             },{
                 xtype:'hidden',
                 fieldLabel: '仓库状态码',
@@ -169,15 +182,17 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
             },{
                 xtype:'textfield',
                 fieldLabel: '单据名称',
-                name: 'mn_caller',
+                name: 'mn_name',
                 allowBlank:false,
                 editable:false,
-                readOnly:true
+                readOnly:true,
+                maxLength: 20
             },{
                 xtype:'textfield',
                 fieldLabel: '单据前缀',
                 name: 'mn_leadcode',
-                allowBlank:false
+                allowBlank:false,
+                maxLength: 20
             },{
                 xtype:'combo',
                 fieldLabel: '单据规则',
@@ -219,6 +234,8 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 align: 'stretch'
             },
             defaults: {
+                labelAlign:'right',
+                beforeLabelTextTpl: "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>",
                 xtype: 'textfield'
             },
             buttons: [{
@@ -235,7 +252,9 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
         return Ext.apply(conf, me.etc[kind]);
     },
     onSave:function(){
+        var me = this;
         var belong = this.belong;
+        me.setLoading(true);
         var form=this.down('form');
         var combo = this._combo;
         var params = {};
@@ -258,6 +277,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
             method: 'POST',
         })
         .then(function(localJson) {
+            me.setLoading(false);
             if(localJson.success){
                 showToast('保存成功');
                 var grid = form.ownerCt._parent.lookup('document-kind-Grid');
@@ -266,13 +286,14 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 }
                 if(combo){
                     combo.store.load(function() {
-                        combo.setValue(params._value);
+                        typeof combo.setValue == 'function' && combo.setValue(params._value);
                     });
                 }
                 form.ownerCt.close();
             }
         })
         .catch(function(res) {
+            me.setLoading(false);
             console.error(res);
             showToast('保存失败: ' + res.message);
         });

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

@@ -31,9 +31,9 @@ Ext.define('saas.view.document.kind.Kind', {
             value: 'vendorkind',
             typeText:'供应商类型'
         }, {
-            text: '商品',
+            text: '物料',
             value: 'productkind',
-            typeText:'商品类型'
+            typeText:'物料类型'
         }, {
             text: '收支',
             value: 'inoutkind',

+ 17 - 2
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -10,8 +10,23 @@ Ext.define('saas.view.document.product.BasePanel', {
         hiddenBtn:true,
         xtype : "remotecombo", 
         storeUrl: '/api/document/producttype/getCombo',
-        name : "pr_type", 
+        name : "pr_kind", 
         emptyText : "请选择物料类型"
+    },{
+        xtype : "textfield", 
+        name : "pr_detail", 
+        emptyText : "物料名称", 
+        columnWidth : 0.25,
+    },{
+        xtype : "textfield", 
+        name : "pr_code", 
+        emptyText : "物料编号", 
+        columnWidth : 0.25,
+    },{
+        xtype : "textfield", 
+        name : "pr_unit", 
+        emptyText : "物料单位", 
+        columnWidth : 0.25,
     }],
 
     //字段属性
@@ -59,7 +74,7 @@ Ext.define('saas.view.document.product.BasePanel', {
         }, 
         {
             text : "物料种类", 
-            dataIndex : "pr_type", 
+            dataIndex : "pr_kind", 
             width : 120.0, 
             xtype : "",
         }]

+ 13 - 12
frontend/saas-web/app/view/document/product/FormController.js

@@ -26,14 +26,15 @@ Ext.define('saas.view.document.product.FormController', {
                         },{
                             field:'ve_name',width:100
                         }],
-                        //联想查询条件
-                        dbtplfield:"ve_name",
+                        defaultCondition: 've_statuscode="OPEN"',
                         //放大镜窗口字段
                         dbSearchFields:[{
-                            xtype : "textfield", 
-                            name : "ve_name", 
-                            conditionExpression:"ve_name like '{0}%'",//传入后台条件  替换占位符
-                            fieldLabel : "供应商名称", 
+                            xtype : "textfield",
+                            name: 'name',
+                            getCondition: function(v) {
+                                return "((ve_code) like '%"+v.toUpperCase()+"%' or (ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            emptyText : "请输入供应商编号或名称", 
                             columnWidth : 0.25
                         }],
                         //放大镜窗口列表
@@ -93,11 +94,11 @@ Ext.define('saas.view.document.product.FormController', {
                         dbSearchFields:[{
                             emptyText:'输入仓库编号或仓库名称或仓库类型',
                             xtype : "textfield", 
-                            name : "wh_code", 
+                            name : "name", 
                             allowBlank : true, 
                             width:260,
                             getCondition:function(v){
-                                return "wh_code like '%" + v + "%' or wh_description like '%"+ v +"%' or wh_type like '%" + v + "%'";
+                                return "((wh_code) like '%"+v.toUpperCase()+"%' or (wh_description) like '%"+v.toUpperCase()+"%')";
                             }
                         }],
                         //窗口列设置
@@ -114,14 +115,14 @@ Ext.define('saas.view.document.product.FormController', {
                             "width": 100,
                             "xtype": "",
                         },{
-                            "text": "仓库类型",
+                            "text": "仓库名称",
                             "flex": 1,
-                            "dataIndex": "wh_type",
+                            "dataIndex": "wh_description",
                             "xtype": "",
                         },{
-                            "text": "仓库名称",
+                            "text": "仓库类型",
                             "flex": 1,
-                            "dataIndex": "wh_description",
+                            "dataIndex": "wh_type",
                             "xtype": "",
                         }]
                     }) ;   

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

@@ -31,20 +31,20 @@ Ext.define('saas.view.document.product.FormPanel', {
         columnWidth: 0.25
     },{
         xtype: 'textfield',
-        name: 'pr_detail',
-        fieldLabel: '物料名称',
+        name: 'pr_code',
+        fieldLabel: '物料编号',
         allowBlank: false,
         columnWidth: 0.25
     },{
         xtype: 'textfield',
-        name: 'pr_code',
-        fieldLabel: '物料编号',
+        name: 'pr_detail',
+        fieldLabel: '物料名称',
         allowBlank: false,
         columnWidth: 0.25
     },{
-        xtype: 'textfield',
+        xtype: 'hidden',
         name: 'pr_status',
-        fieldLabel: '可用状态',
+        fieldLabel: '状态',
         allowBlank: true,
         columnWidth: 0.25
     },{
@@ -53,6 +53,12 @@ Ext.define('saas.view.document.product.FormPanel', {
         fieldLabel: '状态码',
         allowBlank: true,
         columnWidth: 0.25
+    },{
+        xtype: 'textfield',
+        name: 'pr_spec',
+        fieldLabel: '规格',
+        allowBlank: false,
+        columnWidth: 0.25
     },{
         editable:false,
         xtype : "remotecombo", 
@@ -79,6 +85,12 @@ 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/productunit/getCombo',
@@ -110,7 +122,7 @@ Ext.define('saas.view.document.product.FormPanel', {
         storeUrl:'/api/document/productbrand/getCombo',
         name : "pr_brand", 
         fieldLabel : "物料品牌", 
-        allowBlank : false, 
+        allowBlank : true, 
         columnWidth : 0.25,
         addHandler:function(b){
             var document = Ext.create('saas.view.document.kind.Kind',{});
@@ -153,24 +165,48 @@ Ext.define('saas.view.document.product.FormPanel', {
     }, {
         xtype : "textfield", 
         name : "pr_whname", 
-        bind : "{pr_whname}", 
         fieldLabel : "仓库名称", 
         allowBlank : true, 
         columnWidth : 0.25
     },{
+        ignore:true,
+        readOnly:true,
         xtype : "numberfield", 
         name : "pr_standardprice", 
-        bind : "{pr_standardprice}", 
         fieldLabel : "标准单价", 
         allowBlank : true, 
         columnWidth : 0.25
     },{
+        ignore:true,
+        readOnly:true,
+        xtype : "numberfield", 
+        name : "pr_purcprice", 
+        fieldLabel : "最新采购单价", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        ignore:true,
+        readOnly:true,
+        xtype : "numberfield", 
+        name : "pr_saleprice", 
+        fieldLabel : "最新出货单价", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "numberfield", 
+        name : "pr_zxbzs", 
+        fieldLabel : "最小包装数", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{  
+        hidden:true,
         xtype : "datefield", 
         name : "createTime", 
         fieldLabel : "创建时间", 
         allowBlank : true, 
         columnWidth : 0.25
     },{  
+        hidden:true,
         xtype : "datefield", 
         name : "updateTime", 
         fieldLabel : "更新时间", 

+ 2 - 1
frontend/saas-web/app/view/main/Navigation.scss

@@ -97,6 +97,7 @@
         border-bottom-right-radius: 4px;
 
         .menu {
+            
             width: 200px;
             border-right: 1px dashed #ccc;
             letter-spacing: 1px;
@@ -125,7 +126,7 @@
                         cursor: pointer;
                         line-height: 24px;
                         white-space: nowrap;
-                        width: 124px;
+                        width: 130px;
                         overflow: hidden;
                         text-overflow: ellipsis;
                     }

+ 16 - 6
frontend/saas-web/app/view/money/fundtransfer/FormPanel.js

@@ -110,14 +110,24 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
             }, {
                 text : "金额", 
                 dataIndex : "ftd_nowbalance", 
+                width : 120.0, 
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 2
                 },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null,
-                summaryType: 'sum'
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             }, {
                 text : "结算方式号", 
                 dataIndex : "ftd_paycode", 

+ 18 - 0
frontend/saas-web/app/view/money/fundtransfer/FormPanelController.js

@@ -22,6 +22,15 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                         },{
                             field:'bk_bankname',width:100
                         }],
+                        dbSearchFields:[{
+                            xtype : "textfield",
+                            name: 'name',
+                            getCondition: function(v) {
+                                return "(upper(bk_bankcode) like '%"+v.toUpperCase()+"%' or upper(bk_bankname) like '%"+v.toUpperCase()+"%')";
+                            },
+                            emptyText : "请输入账户编号或名称", 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             "text": "账户ID",
                             "flex": 0,
@@ -80,6 +89,15 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                         },{
                             field:'bk_bankname',width:100
                         }],
+                        dbSearchFields:[{
+                            xtype : "textfield", 
+                            name: 'name',
+                            getCondition: function(v) {
+                                return "(upper(bk_bankcode) like '%"+v.toUpperCase()+"%' or upper(bk_bankname) like '%"+v.toUpperCase()+"%')";
+                            },
+                            emptyText:'输入账户编号或名称',
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             "text": "账户ID",
                             "flex": 0,

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

@@ -58,8 +58,13 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         }, {
             text: '金额',
             dataIndex: 'ftd_nowbalance',
-            xtype : "numbercolumn",
-            width: 120
+            width: 120,
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
         }, {
             text: '结算方式',
             dataIndex: 'ftd_paymethod',

+ 18 - 21
frontend/saas-web/app/view/money/othreceipts/FormPanel.js

@@ -102,38 +102,35 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
             }, {
                 text : "金额", 
                 dataIndex : "ord_nowbalance", 
-                editor : {
-                    xtype : "numberfield"
-                },
                 width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null,
-                summaryType: 'sum'
-            }, {
-                text : "单价", 
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 2
                 },
-                format:'0,000.00',
-                dataIndex : "sd_price", 
-                width : 120.0, 
-                xtype : "numbercolumn",
-                items : null,
-                summaryType: 'sum'
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             }, {
                 text : "备注", 
                 dataIndex : "ord_remark",
-                width : 120.0, 
-                items : null,
-                flex : 1.0,
+                width : 220, 
                 editor : {
-                    xtype : ""
+                    xtype : "textarea"
                 }
             }
         ]
     }, {
-        xtype : "textfield", 
+        xtype : "numberfield", 
         name : "or_amount", 
         fieldLabel : "收款金额",
         readOnly:true

+ 2 - 2
frontend/saas-web/app/view/money/othreceipts/FormPanelController.js

@@ -34,7 +34,7 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
                             xtype: "textfield",
                             name: "search",
                             getCondition: function (v) {
-                                return "CONCAT(cu_code, cu_name) like '%" + v + "%'";
+                                return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
                             },
                             allowBlank: true,
                             columnWidth: 0.25
@@ -133,7 +133,7 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
                             xtype: "textfield",
                             name: "search",
                             getCondition: function (v) {
-                                return "CONCAT(bk_bankcode, bk_bankname) like '%" + v + "%'";
+                                return "(upper(bk_bankcode) like '%"+v.toUpperCase()+"%' or upper(bk_bankname) like '%"+v.toUpperCase()+"%')";
                             },
                             allowBlank: true,
                             columnWidth: 0.25

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

@@ -75,7 +75,6 @@ Ext.define('saas.view.money.othreceipts.QueryPanel', {
         }, {
             text: '金额',
             dataIndex: 'or_amount',
-            xtype: 'numbercolumn',
             width: 120
         }, {
             text: '备注',

+ 36 - 18
frontend/saas-web/app/view/money/othspendings/FormPanel.js

@@ -102,38 +102,56 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
             }, {
                 text : "金额", 
                 dataIndex : "osd_nowbalance", 
+                width : 120.0,
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 2
                 },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null,
-                summaryType: 'sum'
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             }, {
                 text : "单价", 
+                dataIndex : "sd_price", 
+                width : 120.0,
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8
                 },
-                format:'0,000.00',
-                dataIndex : "sd_price", 
-                width : 120.0, 
-                xtype : "numbercolumn",
-                items : null,
-                summaryType: 'sum'
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             }, {
                 text : "备注", 
                 dataIndex : "osd_remark",
-                width : 120.0, 
-                items : null,
+                width : 250, 
                 editor : {
-                    xtype : ""
+                    xtype : "textfield"
                 },
-                flex : 1.0,
             }
         ]
     }, {
-        xtype : "textfield", 
+        xtype : "numberfield", 
         name : "os_amount", 
         fieldLabel : "收款金额",
         readOnly:true

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

@@ -28,9 +28,20 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
                             field: 've_name',
                             width: 100
                         }],
+                        defaultCondition: "ve_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "id",
                             "width": 100,
                             "xtype": "numbercolumn"

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

@@ -75,8 +75,13 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         }, {
             text: '金额',
             dataIndex: 'os_amount',
-            xtype: 'numbercolumn',
-            width: 120
+            width: 120,
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
         }, {
             text: '备注',
             dataIndex: 'os_remark',

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

@@ -23,9 +23,20 @@ Ext.define('saas.view.money.othspendings.QueryPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
+                        defaultCondition: "ve_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "id",
                             "width": 100,
                             "xtype": "numbercolumn"

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

@@ -112,8 +112,22 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         }, {
             text: "付款金额",
             dataIndex: "pd_amount",
-            editor:{
-                xtype: 'numberfield'
+            editor : {
+                xtype : "numberfield",
+                decimalPrecision: 2
+            },
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
             }
         }, {
             text: "结算方式",
@@ -123,7 +137,8 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             dataIndex: "pd_paycode"
         }, {
             text: "备注",
-            dataIndex: "pb_remark",
+            dataIndex: "pd_remark",
+            width: 250,
             editor:{
                 xtype: 'textfield'
             }
@@ -163,30 +178,87 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         }, {
             text: "单据金额",
             dataIndex: "pbd_amount",
-            editor:{
-                xtype: 'numberfield'
+            // editor : {
+            //     xtype : "numberfield",
+            //     decimalPrecision: 2
+            // },
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
             }
         }, {
             text: "已核销金额",
             dataIndex: "pb_remark",
-            editor:{
-                xtype: 'numberfield'
+            // editor : {
+            //     xtype : "numberfield",
+            //     decimalPrecision: 2
+            // },
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
             }
         }, {
             text: "未核销金额",
             dataIndex: "pb_remark",
-            editor:{
-                xtype: 'numberfield'
+            // editor : {
+            //     xtype : "numberfield",
+            //     decimalPrecision: 2
+            // },
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
             }
         }, {
             text: "本次核销金额",
             dataIndex: "pbd_nowbalance",
-            editor:{
-                xtype: 'numberfield'
+            editor : {
+                xtype : "numberfield",
+                decimalPrecision: 2
+            },
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
             }
         }, {
             text: '备注',
             dataIndex: 'pbd_remark',
+            width: 250,
             editor:{
                 xtype: 'textfield'
             }

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

@@ -25,19 +25,21 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
-                        //联想查询条件
-                        dbtplfield:"ve_name",
-                        //放大镜窗口字段
+                        defaultCondition: "ve_statuscode='OPEN'",
                         dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
-                            name : "ve_name", 
-                            fieldLabel : "供应商名称", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
                             columnWidth : 0.25
                         }],
                         //放大镜窗口列表
                         dbColumns:[{
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "ve_id",
                             "width": 0,
                             "xtype": "",

+ 27 - 7
frontend/saas-web/app/view/money/payBalance/QueryPanelController.js

@@ -22,10 +22,21 @@ Ext.define('saas.view.money.paybalance.QueryPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
+                        defaultCondition: "ve_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             conditionCode:'ve_id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "ve_id",
                             "width": 0,
                             "xtype": "",
@@ -76,14 +87,23 @@ Ext.define('saas.view.money.paybalance.QueryPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
                             "text": "物料编号",
                             "flex": 1,
                             "dataIndex": "pr_code",

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

@@ -49,7 +49,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         name: "rb_rdamount",
         fieldLabel: "总欠款"
     }, {
-        xtype: 'numberfield',
+        xtype: 'hidden',
         name: 'rb_rbdamount',
         fieldLabel: '本次核销金额'
     }, {
@@ -57,24 +57,24 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         name: "rb_date",
         fieldLabel: "日期"
     }, {
-        xtype: "textfield",
+        xtype: "hidden",
         name: "rb_manname",
         fieldLabel: "收款人"
     }, {
-        xtype: 'textareafield',
+        xtype: 'hidden',
         name: 'rb_remark',
         fieldLabel: '备注',
         columnWidth: 1
     }, {
-        xtype: "numberfield",
+        xtype: "hidden",
         name: "rb_discounts",
         fieldLabel: "整单折扣"
     }, {
-        xtype: 'numberfield',
+        xtype: 'hidden',
         name: 'rb_preamount',
         fieldLabel : '本次预收款'
     }, {
-        xtype: 'numberfield',
+        xtype: 'hidden',
         name: 'rb_havebalance',
         fieldLabel: '已核销金额'
     }, {
@@ -91,21 +91,24 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
             dataIndex: 'rd_ym',
             editor: {
                 xtype: 'numberfield'
-            }
+            },
+            hidden: true
         }, {
             text: '资金账户ID',
             dataIndex: 'rd_bankid',
             width : 100.0, 
             editor: {
                 xtype: 'numberfield'
-            }
+            },
+            hidden: true
         }, {
             text: '资金账户编号',
             dataIndex: 'rd_bankcode',
             width : 100.0, 
             editor: {
                 xtype: 'textfield'
-            }
+            },
+            hidden: true
         }, {
             text: '资金账户',
             dataIndex: 'rd_bankname',
@@ -116,8 +119,22 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "收款金额",
             dataIndex: "rd_amount",
-            editor: {
-                xtype: 'numberfield'
+            editor : {
+                xtype : "numberfield",
+                decimalPrecision: 2
+            },
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
             }
         }, {
             text: "结算方式",
@@ -134,6 +151,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "备注",
             dataIndex: "rd_remark",
+            width: 250,
             editor: {
                 xtype: 'textfield'
             }
@@ -152,13 +170,15 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
             dataIndex: 'rbd_ym',
             editor: {
                 xtype: 'numberfield'
-            }
+            },
+            hidden: true
         }, {
             text: '来源ID',
             dataIndex: 'rbd_slid',
             editor: {
                 xtype: 'numberfield'
-            }
+            },
+            hidden: true
         }, {
             text: '来源单号',
             dataIndex: 'rbd_slcode',
@@ -180,53 +200,114 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "单据金额",
             dataIndex: "rbd_amount",
-            editor: {
-                xtype: 'numberfield'
+            // editor : {
+            //     xtype : "numberfield",
+            //     decimalPrecision: 2
+            // },
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
             }
-        // }, {
-        //     text: "已核销金额",
-        //     dataIndex: "rbd_nowbalance",
-        //     editor: {
-        //         xtype: 'numberfield'
-        //     }
-        // }, {
-        //     text: "未核销金额",
-        //     dataIndex: "pbd_nowbalance",
-        //     editor: {
-        //         xtype: 'numberfield'
-        //     }
         }, {
-            text: "本次核销金额",
+            text: "已核销金额",
+            dataIndex: "rbd_nowbalance",
+            // editor : {
+            //     xtype : "numberfield",
+            //     decimalPrecision: 2
+            // },
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            }
+        }, {
+            text: "未核销金额",
             dataIndex: "pbd_nowbalance",
-            editor: {
-                xtype: 'numberfield'
+            // editor : {
+            //     xtype : "numberfield",
+            //     decimalPrecision: 2
+            // },
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
             }
         }, {
-            text: '备注',
-            dataIndex: 'rbd_remark',
-            editor: {
-                xtype: 'textfield'
+            text: "本次核销金额",
+            dataIndex: "pbd_nowbalance",
+            editor : {
+                xtype : "numberfield",
+                decimalPrecision: 2
+            },
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
             }
+        // }, {
+        //     text: '备注',
+        //     dataIndex: 'rbd_remark',
+        //     editor: {
+        //         xtype: 'textfield'
+        //     }
         }]
     }, {
         xtype: 'numberfield',
         name: 'rb_recorderid',
-        fieldLabel: '录入人ID'
+        fieldLabel: '录入人ID',
+        hidden: true
     }, {
         xtype: 'textfield',
         name: 'rb_recorder',
-        fieldLabel: '录入人'
+        fieldLabel: '录入人',
+        hidden: true
     }, {
         xtype: 'numberfield',
         name: 'updaterId',
-        fieldLabel: '更新人ID'
+        fieldLabel: '更新人ID',
+        hidden: true
     }, {
         xtype: 'datefield',
         name: 'updatedate',
-        fieldLabel: '更新时间'
+        fieldLabel: '更新时间',
+        hidden: true
     }, {
         xtype: "datefield",
         name: "rb_recorddate",
-        fieldLabel: "创建时间"
+        fieldLabel: "创建时间",
+        hidden: true
     }]
 });

+ 10 - 7
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -26,13 +26,14 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                         },{
                             field:'cu_name',width:100
                         }],
-                        //联想查询条件
-                        dbCondition:"CONCAT(cu_code, cu_name) like '{0}%'",
+                        defaultCondition: 'cu_statuscode="OPEN"',
                         //放大镜窗口字段
                         dbSearchFields:[{
-                            xtype : "textfield", 
+                            emptyText:'输入客户编号或名称',
                             name : "cu_name", 
-                            conditionExpression:"cu_name like '{0}%'",//传入后台条件  替换占位符
+                            getCondition: function(v) {
+                                return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
+                            },
                             fieldLabel : "客户名称", 
                             columnWidth : 0.25
                         }],
@@ -84,12 +85,14 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                             field:'cu_name',width:100
                         }],
                         //联想查询条件
-                        dbCondition:"CONCAT(cu_code, cu_name) like '{0}%'",
+                        defaultCondition: 'cu_statuscode="OPEN"',
                         //放大镜窗口字段
                         dbSearchFields:[{
-                            xtype : "textfield", 
+                            emptyText:'输入客户编号或名称',
                             name : "cu_name", 
-                            conditionExpression:"cu_name like '{0}%'",//传入后台条件  替换占位符
+                            getCondition: function(v) {
+                                return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
+                            },
                             fieldLabel : "客户名称", 
                             columnWidth : 0.25
                         }],

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

@@ -38,7 +38,8 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
             text: 'id',
             dataIndex: 'id',
             width: 100,
-            xtype: 'numbercolumn'
+            xtype: 'numbercolumn',
+            hidden: true
         }, {
             text: '单据编号',
             dataIndex: 'rb_code',
@@ -54,21 +55,23 @@ Ext.define('saas.view.money.recBalance.QueryPanel', {
             width: 200
         }, {
             text: '客户编号',
-            dataIndex: 'rb_custcode'
+            dataIndex: 'rb_custcode',
+            hidden: true
         }, {
             text: '客户名称',
-            dataIndex: 'rb_custname'
+            dataIndex: 'rb_custname',
         }, {
             text: '收款人',
             dataIndex: 'rb_manname',
             xtype: 'numbercolumn',
-            width: 120
+            width: 120,
         }, {
             text: '收款金额',
             dataIndex: 'rb_rdamount',
             xtype: 'numbercolumn',
             width: 120,
-            flex: 1
+            flex: 1,
+            hidden: true
         }]
     }
 });

+ 27 - 7
frontend/saas-web/app/view/money/recBalance/QueryPanelController.js

@@ -22,10 +22,21 @@ Ext.define('saas.view.money.recBalance.QueryPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
+                        defaultCondition: "ve_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             conditionCode:'ve_id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "ve_id",
                             "width": 0,
                             "xtype": "",
@@ -76,14 +87,23 @@ Ext.define('saas.view.money.recBalance.QueryPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
                             "text": "物料编号",
                             "flex": 1,
                             "dataIndex": "pr_code",

+ 93 - 29
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -85,7 +85,8 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
     }, {
         xtype : "textfield", 
         name : "pu_total", 
-        fieldLabel : "单据金额"
+        fieldLabel : "单据金额",
+        readOnly:true
     }, {
         name : "detailGridField", 
         xtype : "detailGridField", 
@@ -145,61 +146,124 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
             {
                 text : "数量", 
                 dataIndex : "pd_qty", 
+                width : 120.0,
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8,
+                    minValue:0
                 },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0,000.00',
-                summaryType: 'sum'
+                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);
+                },
+                summaryType: 'sum',
+                summaryRenderer: 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);
+                }
             },
             {
                 text : "已转数", 
                 dataIndex : "pd_yqty", 
+                width : 120.0,
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8
                 },
-                width : 120.0,
-                format:'0,000.00', 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null
+                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);
+                },
+                summaryType: 'sum',
+                summaryRenderer: 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);
+                }
             },
             {
                 text : "单价", 
+                dataIndex : "pd_price", 
+                width : 120.0,
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8
                 },
-                format:'0,000.00',
-                dataIndex : "pd_price", 
-                width : 120.0, 
-                xtype : "numbercolumn",
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             }, 
             {
                 text : "税率", 
-                editor : {
-                    xtype : "numberfield"
-                },
                 dataIndex : "pd_taxrate", 
-                format:'0,000.00',
-                width : 120.0, 
-                xtype : "numbercolumn",
+                width : 120.0,
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 0,
+                    minValue: 0,
+                    maxValue: 100
+                }
             },
             {
                 text : "含税金额", 
                 dataIndex : "pd_total", 
                 width : 120.0, 
-                format:'0,000.00',
-                xtype : "numbercolumn",
-                summaryType: 'sum'
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             }, 
             {
                 text : "未含税金额", 
                 dataIndex : "pd_taxtotal", 
                 width : 120.0,
-                format:'0,000.00', 
-                xtype : "numbercolumn",
-                summaryType: 'sum'
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             },{
                 text : "需求日期", 
                 dataIndex : "pd_delivery", 

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

@@ -15,6 +15,8 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         defaultCondition:"ve_statuscode='OPEN'",
                         //赋值 
                         dbfinds:[{
+                            from:'id',to:'pu_vendid'
+                        },{
                             from:'ve_code',to:'pu_vendcode'
                         },{
                             from:'ve_name',to:'pu_vendname'
@@ -25,15 +27,13 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
-                        //联想查询条件
-                        dbtplfield:"ve_name",
-                        //放大镜窗口字段
+                        defaultCondition: "ve_statuscode='OPEN'",
                         dbSearchFields:[{
                             emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
                             name : "search", 
                             getCondition: function(v) {
-                                return "CONCAT(ve_code, ve_name) like '%" + v + "%'";
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
                             },
                             allowBlank : true, 
                             columnWidth : 0.25
@@ -96,7 +96,6 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         dataUrl: '/api/document/product/list',
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
-                        defaultCondition:"pr_statuscode='OPEN'",
                         //放大镜赋值设置
                         dbfinds:[{
                             from:'id',to:'pd_prodid'                          
@@ -113,22 +112,23 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
-                        //窗口字段设置
+                        defaultCondition: "pr_statuscode='OPEN'",
                         dbSearchFields:[{
-                            emptyText:'输入物料编号或物料名称',
+                            emptyText:'输入物料编号、名称或规格',
                             xtype : "textfield", 
                             name : "search", 
-                            getCondition: function(v) {
-                                return "CONCAT(pr_code, pr_detail) like '%"+v+"%'";
-                            },
                             allowBlank : true, 
-                            columnWidth : 0.25
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "(upper(pr_code) like '%" + v.toUpperCase() + "%' or upper(pr_detail) like '%"+ v.toUpperCase() +"%' or upper(pr_spec) like '%"+ v.toUpperCase() +"%')";
+                            }
                         }],
                         //窗口列设置
                         dbColumns:[{
                             "text": "物料ID",
+                            "hidden": true,
                             "dataIndex": "id",
-                        },{
+                        }, {
                             "text": "物料编号",
                             "dataIndex": "pr_code",
                         }, {

+ 0 - 1
frontend/saas-web/app/view/purchase/purchase/QueryPanel.js

@@ -134,7 +134,6 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             dataIndex: 'pu_total',
             xtype: 'numbercolumn',
             width: 120,
-            flex: 1
         }],
         relativeColumn: [{
             text: 'id',

+ 27 - 7
frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js

@@ -22,10 +22,21 @@ Ext.define('saas.view.purchase.purchase.QueryPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
+                        defaultCondition: "ve_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             conditionCode:'ve_id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "ve_id",
                             "width": 0,
                             "xtype": "",
@@ -76,14 +87,23 @@ Ext.define('saas.view.purchase.purchase.QueryPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
                             "text": "物料编号",
                             "flex": 1,
                             "dataIndex": "pr_code",

+ 76 - 21
frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js

@@ -164,22 +164,46 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
             {
                 text : "数量", 
                 dataIndex : "pd_inqty", 
+                width : 120.0,
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8,
+                    minValue:0
                 },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null,
-                summaryType: 'sum'
+                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);
+                },
+                summaryType: 'sum',
+                summaryRenderer: 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);
+                }
             },            {
                 text : "已转数", 
                 dataIndex : "pd_yqty", 
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null,
-                summaryType: 'sum'
+                width : 120.0,
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 8
+                },
+                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);
+                },
+                summaryType: 'sum',
+                summaryRenderer: 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);
+                }
             },{
                 text : "仓库id", 
                 dataIndex : "pd_whid", 
@@ -253,22 +277,53 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 text : "含税金额", 
                 dataIndex : "pd_total", 
                 width : 120.0, 
-                xtype : "numbercolumn",
-                summaryType: 'sum'
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             }, {
                 text : "税率", 
-                editor : {
-                    xtype : "numberfield"
-                }, 
                 dataIndex : "pd_taxrate", 
-                width : 120.0, 
-                xtype : "numbercolumn"
+                width : 120.0,
+                editor : {
+                    decimalPrecision: 0,
+                    minValue: 0,
+                    maxValue: 100
+                }
             },
             {
                 text : "未税金额", 
                 dataIndex : "pd_nettotal", 
-                xtype : "numbercolumn",
-                summaryType: 'sum'
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             },
             {
                 text : "采购单明细id", 
@@ -285,7 +340,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 dataIndex : "pd_orderdetno", 
                 xtype : "numbercolumn",
                 width : 120.0,
-                format: '0000',
+                format: '0',
                 renderer: function(v) {
                     return v ? v : null;
                 }

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

@@ -33,23 +33,21 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
-                        //联想查询条件
-                        dbtplfield:"ve_name",
-                        //放大镜窗口字段
+                        defaultCondition: "ve_statuscode='OPEN'",
                         dbSearchFields:[{
                             emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
-                            name : "ve_name", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "ve_name like '%" + v + "%' or ve_code like '%"+ v +"%'";
-                            }
+                            columnWidth : 0.25
                         }],
                         dbColumns:[{
                             conditionCode:'ve_id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "ve_id",
                             "width": 0,
                             "xtype": "",
@@ -112,25 +110,24 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         },{
                             field:'pr_spec',width:100
                         }],
-                        //窗口字段设置
+                        defaultCondition: "pr_statuscode='OPEN'",
                         dbSearchFields:[{
-                            emptyText:'输入物料编号或物料名称',
+                            emptyText:'输入物料编号、名称或规格',
                             xtype : "textfield", 
                             name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "pr_code like '%" + v + "%' or pr_detail like '%"+ v +"%'";
-                            }
+                            columnWidth : 0.25
                         }],
                         //窗口列设置
                         dbColumns:[{
                             "text": "物料ID",
+                            "hidden": true,
                             "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
+                        }, {
                             "text": "物料编号",       
                             "dataIndex": "pr_code",
                             "width": 100,
@@ -260,7 +257,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25,
                             getCondition:function(v){
-                                return "wh_code like '%" + v + "%' or wh_description like '%"+ v +"%'";
+                                return "(upper(wh_code) like '%"+v.toUpperCase()+"%' or upper(wh_description) like '%"+v.toUpperCase()+"%')";
                             }
                         }],                        
                         dbColumns:[{

+ 27 - 7
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js

@@ -22,10 +22,21 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
+                        defaultCondition: "ve_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             conditionCode:'ve_id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "ve_id",
                             "width": 0,
                             "xtype": "",
@@ -75,14 +86,23 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
                             "text": "物料编号",
                             "flex": 1,
                             "dataIndex": "pr_code",

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

@@ -156,7 +156,8 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 text : "数量", 
                 dataIndex : "pd_outqty", 
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    minValue:0
                 },
                 width : 120.0, 
                 xtype : "numbercolumn", 

+ 18 - 21
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -32,23 +32,21 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
-                        //联想查询条件
-                        dbtplfield:"ve_name",
-                        //放大镜窗口字段
+                        defaultCondition: "ve_statuscode='OPEN'",
                         dbSearchFields:[{
                             emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
-                            name : "ve_name", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "ve_name like '%" + v + "%' or ve_code like '%"+ v +"%'";
-                            }
+                            columnWidth : 0.25
                         }],
                         dbColumns:[{
                             conditionCode:'ve_id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "ve_id",
                             "width": 0,
                             "xtype": "",
@@ -111,25 +109,24 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         },{
                             field:'pr_unit',width:100
                         }],
-                        //窗口字段设置
+                        defaultCondition: "pr_statuscode='OPEN'",
                         dbSearchFields:[{
-                            emptyText:'输入物料编号或物料名称',
+                            emptyText:'输入物料编号、名称或规格',
                             xtype : "textfield", 
                             name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "pr_code like '%" + v + "%' or pr_detail like '%"+ v +"%'";
-                            }
-                        }],                        
+                            columnWidth : 0.25
+                        }],                      
                         //窗口列设置
                         dbColumns:[{
                             "text": "物料ID",
+                            "hidden": true,
                             "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
+                        }, {
                             "text": "物料编号",       
                             "dataIndex": "pr_code",
                             "width": 100,
@@ -259,7 +256,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25,
                             getCondition:function(v){
-                                return "wh_code like '%" + v + "%' or wh_description like '%"+ v +"%'";
+                                return "(upper(wh_code) like '%"+v.toUpperCase()+"%' or upper(wh_description) like '%"+v.toUpperCase()+"%')";
                             }
                         }],                        
                         dbColumns:[{

+ 27 - 7
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js

@@ -22,10 +22,21 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
+                        defaultCondition: "ve_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             conditionCode:'ve_id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "ve_id",
                             "width": 0,
                             "xtype": "",
@@ -75,14 +86,23 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
                             "text": "物料编号",
                             "flex": 1,
                             "dataIndex": "pr_code",

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

@@ -113,53 +113,112 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 text : "数量", 
                 dataIndex : "sd_qty", 
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8
                 },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0,000.00',
-                items : null,
-                allowBlank:false,
-                summaryType: 'sum'
+                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);
+                },
+                summaryType: 'sum',
+                summaryRenderer: 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);
+                }
             },  {
                 text : "已转数", 
                 dataIndex : "sd_yqty", 
                 width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0.00'
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                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);
+                },
+                summaryType: 'sum',
+                summaryRenderer: 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);
+                }
             },
             {
                 text : "单价", 
+                dataIndex : "sd_price", 
+                width : 120.0,
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
                 },
-                format:'0,000.00',
-                dataIndex : "sd_price", 
-                width : 120.0, 
-                xtype : "numbercolumn",
-                items : null
             }, 
             {
                 text : "税率", 
-                editor : {
-                    xtype : "numberfield"
-                },
                 dataIndex : "sd_taxrate", 
                 width : 120.0, 
-                xtype : "numbercolumn", 
-                items : null
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 0,
+                    minValue: 0,
+                    maxValue: 100
+                },
             },
             {
                 text : "含税金额", 
                 dataIndex : "sd_total", 
-                width : 120.0, 
-                xtype : "numbercolumn",
-                summaryType: 'sum'
+                width : 120.0,
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             }, 
             {
-                text : "未税金额", 
-                dataIndex : "sd_nettotal", 
-                xtype : "numbercolumn"
+                text : "未含税金额", 
+                dataIndex : "sd_nettotal",
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             },{
                 text : "交货日期", 
                 dataIndex : "sd_delivery", 
@@ -178,11 +237,11 @@ Ext.define('saas.view.sale.sale.FormPanel', {
             },{
                 text : "备注", 
                 dataIndex : "sd_remark",
-                width : 120.0, 
+                width : 250, 
                 items : null,
                 ignore:true,
                 editor : {
-                    xtype : ""
+                    xtype : "textfield"
                 },
             }
         ]

+ 14 - 5
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -32,7 +32,7 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                             xtype : "textfield", 
                             name : "search", 
                             getCondition: function(v) {
-                                return "CONCAT(cu_code, cu_name) like '%" + v + "%'";
+                                return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
                             },
                             allowBlank : true, 
                             columnWidth : 0.25
@@ -126,14 +126,23 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[
                             {
                                 "text": "物料ID",
-                                "flex": 0,
+                                "hidden": true,
                                 "dataIndex": "id",
-                                "width": 0,
-                                "xtype": "",
-                                "items": null
                             },{
                                 "text": "物料编号",
                                 "flex": 1,

+ 13 - 4
frontend/saas-web/app/view/sale/sale/QueryPanelController.js

@@ -76,14 +76,23 @@ Ext.define('saas.view.sale.sale.QueryPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[
                             {
                                 "text": "物料ID",
-                                "flex": 0,
+                                "hidden": true,
                                 "dataIndex": "id",
-                                "width": 0,
-                                "xtype": "",
-                                "items": null
                             },{
                                 "text": "物料编号",
                                 "flex": 1,

+ 67 - 18
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -108,13 +108,24 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 text : "数量", 
                 dataIndex : "pd_inqty", 
                 allowBlank:false,
+                width : 120.0,
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8
                 },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                summaryType: 'sum'
+                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);
+                },
+                summaryType: 'sum',
+                summaryRenderer: 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);
+                }
             }, {
                 text : "仓库ID", 
                 dataIndex : "pd_whid", 
@@ -122,7 +133,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
             }, {
                 text : "仓库", 
                 dataIndex : "pd_whcode", 
-                width :0
+                hidden :true
             }, {
                 text : "仓库", 
                 dataIndex : "pd_whname", 
@@ -147,30 +158,68 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 dataIndex : "pd_sendprice", 
                 width : 120.0, 
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
                 },
-                xtype : "numbercolumn", 
             }, 
            {
                 text : "含税金额", 
                 dataIndex : "pd_total", 
                 width : 120.0, 
-                xtype : "numbercolumn",
-                summaryType: 'sum'
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             }, {
                 text : "税率", 
                 dataIndex : "pd_taxrate", 
                 width : 120.0, 
                 editor : {
-                    xtype : "numberfield"
-                },
-                xtype : "numbercolumn", 
-                items : null
+                    xtype : "numberfield",
+                    decimalPrecision: 0,
+                    minValue: 0,
+                    maxValue: 100
+                }
             },
             {
-                text : "未税金额", 
+                text : "未税金额", 
                 dataIndex : "pd_nettotal", 
-                xtype : "numbercolumn"
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             },
             {
                 text : "销售订单明细id", 
@@ -186,8 +235,8 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 text : "销售序号", 
                 dataIndex : "pd_orderdetno", 
                 xtype : "numbercolumn",
-                flex:1,
-                format: '0000',
+                width: 100,
+                format: '0',
                 renderer: function(v) {
                     return v ? v : null;
                 }

+ 14 - 5
frontend/saas-web/app/view/sale/saleIn/FormPanelController.js

@@ -33,7 +33,7 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                             xtype : "textfield", 
                             name : "search", 
                             getCondition: function(v) {
-                                return "CONCAT(cu_code, cu_name) like '%" + v + "%'";
+                                return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
                             },
                             allowBlank : true, 
                             columnWidth : 0.25
@@ -126,14 +126,23 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[
                             {
                                 "text": "物料ID",
-                                "flex": 0,
+                                "hidden": true,
                                 "dataIndex": "id",
-                                "width": 0,
-                                "xtype": "",
-                                "items": null
                             },{
                                 "text": "物料编号",
                                 "flex": 1,

+ 13 - 4
frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js

@@ -81,14 +81,23 @@ Ext.define('saas.view.sale.saleIn.QueryPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[
                             {
                                 "text": "物料ID",
-                                "flex": 0,
+                                "hidden": true,
                                 "dataIndex": "id",
-                                "width": 0,
-                                "xtype": "",
-                                "items": null
                             },{
                                 "text": "物料编号",
                                 "flex": 1,

+ 65 - 21
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -117,15 +117,25 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
             },  {
                 text : "出货数量", 
                 dataIndex : "pd_outqty", 
+                width : 120.0, 
+                allowBlank:false,
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8
+                },
+                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);
                 },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0,000.00',
-                items : null,
                 summaryType: 'sum',
-                allowBlank:false,
+                summaryRenderer: 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);
+                }
             }, {
                 text : "仓库ID", 
                 dataIndex : "pd_whid", 
@@ -133,7 +143,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
             }, {
                 text : "仓库", 
                 dataIndex : "pd_whcode", 
-                width :0
+                hidden :true
             }, {
                 text : "仓库", 
                 dataIndex : "pd_whname", 
@@ -157,36 +167,70 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
             {
                 text : "单价", 
                 dataIndex : "pd_sendprice", 
+                width : 120.0,
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
                 },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                items : null
             }, 
            {
                 text : "含税金额", 
                 dataIndex : "pd_total", 
                 width : 120.0, 
-                xtype : "numbercolumn",
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 2
                 },
-                summaryType: 'sum'
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             }, {
                 text : "税率", 
                 dataIndex : "pd_taxrate", 
                 width : 120.0, 
-                xtype : "numbercolumn", 
                 editor : {
-                    xtype : "numberfield"
-                },
-                items : null
+                    xtype : "numberfield",
+                    decimalPrecision: 0,
+                    minValue: 0,
+                    maxValue: 100
+                }
             },
             {
-                text : "未税金额", 
+                text : "未税金额", 
                 dataIndex : "pd_nettotal", 
-                xtype : "numbercolumn"
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             },
             {
                 text : "销售单号", 
@@ -197,7 +241,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 dataIndex : "pd_orderdetno", 
                 xtype : "numbercolumn",
                 width : 120.0,
-                format: '0000',
+                format: '0',
                 renderer: function(v) {
                     return v ? v : null;
                 }

+ 14 - 5
frontend/saas-web/app/view/sale/saleOut/FormPanelController.js

@@ -34,7 +34,7 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                             xtype : "textfield", 
                             name : "search", 
                             getCondition: function(v) {
-                                return "CONCAT(cu_code, cu_name) like '%" + v + "%'";
+                                return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
                             },
                             allowBlank : true, 
                             columnWidth : 0.25
@@ -124,14 +124,23 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[
                             {
                                 "text": "物料ID",
-                                "flex": 0,
+                                "hidden": true,
                                 "dataIndex": "id",
-                                "width": 0,
-                                "xtype": "",
-                                "items": null
                             },{
                                 "text": "物料编号",
                                 "flex": 1,

+ 17 - 8
frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js

@@ -113,15 +113,24 @@ Ext.define('saas.view.sale.saleout.QueryPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[
-                        {
-                            "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
+                            {
+                                "text": "物料ID",
+                                "hidden": true,
+                                "dataIndex": "id",
+                            },{
                             "text": "物料编号",
                             "flex": 1,
                             "dataIndex": "pr_code",

+ 16 - 6
frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js

@@ -162,14 +162,24 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
             {
                 text : "数量", 
                 dataIndex : "pd_inqty", 
+                width : 120.0,
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8
                 },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null,
-                summaryType: 'sum'
+                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);
+                },
+                summaryType: 'sum',
+                summaryRenderer: 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);
+                }
             },{
                 text : "拨出仓库id", 
                 dataIndex : "pd_whid", 

+ 20 - 25
frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js

@@ -19,7 +19,6 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         // dataUrl:'http://localhost:9480/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
-                        defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
                             from:'id',to:'pi_vendid'
                         },{
@@ -32,23 +31,21 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
-                        //联想查询条件
-                        dbtplfield:"ve_name",
-                        //放大镜窗口字段
+                        defaultCondition: "ve_statuscode='OPEN'",
                         dbSearchFields:[{
                             emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
-                            name : "ve_name", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "ve_name like '%" + v + "%' or ve_code like '%"+ v +"%'";
-                            }
+                            columnWidth : 0.25
                         }],
                         dbColumns:[{
                             conditionCode:'id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
@@ -101,8 +98,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         },{
                             field:'pi_custname',width:100
                         }],
-                        //联想查询条件
-                        dbtplfield:"cu_name",
+                        defaultCondition:"cu_statuscode='OPEN'",
                         //放大镜窗口字段
                         dbSearchFields:[{
                             emptyText:'输入客户编号或名称',
@@ -111,7 +107,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25,
                             getCondition:function(v){
-                                return "cu_name like '%" + v + "%' or cu_code like '%"+ v +"%'";
+                                return "upper(cu_name) like '%"+v.toUpperCase()+"%' or upper(cu_code) like '%"+v.toUpperCase()+"%'";
                             }
                         }],
                         dbColumns:[{
@@ -199,23 +195,22 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         },{
                             field:'pr_spec',width:100
                         }],
-                        //窗口字段设置
+                        defaultCondition: "pr_statuscode='OPEN'",
                         dbSearchFields:[{
-                            emptyText:'输入物料编号或物料名称',
+                            emptyText:'输入物料编号、名称或规格',
                             xtype : "textfield", 
                             name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "pr_code like '%" + v + "%' or pr_detail like '%"+ v +"%'";
-                            }
-                        }],                         
+                            columnWidth : 0.25
+                        }],                   
                         dbColumns:[{
                             "text": "物料ID",
+                            "hidden": true,
                             "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "物料编号",       
                             "dataIndex": "pr_code",
@@ -345,7 +340,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         allowBlank : true, 
                         columnWidth : 0.25,
                         getCondition:function(v){
-                            return "wh_code like '%" + v + "%' or wh_description like '%"+ v +"%'";
+                            return "upper(wh_code) like '%"+v.toUpperCase()+"%' or upper(wh_description) like '%"+v.toUpperCase()+"%'";
                         }
                     }],                    
                     dbColumns:[{
@@ -401,7 +396,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                     allowBlank : true, 
                     columnWidth : 0.25,
                     getCondition:function(v){
-                        return "wh_code like '%" + v + "%' or wh_description like '%"+ v +"%'";
+                        return "upper(wh_code) like '%"+v.toUpperCase()+"%' or upper(wh_description) like '%"+v.toUpperCase()+"%'";
                     }
                 }],                 
                  dbColumns:[{

+ 28 - 1
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanelController.js

@@ -22,10 +22,21 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
+                        defaultCondition: "ve_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             conditionCode:'ve_id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "ve_id",
                             "width": 0,
                             "xtype": "",
@@ -74,7 +85,23 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
+                            "text": "物料ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        },{
                             "text": "物料ID",
                             "flex": 0,
                             "dataIndex": "pr_id",

+ 17 - 7
frontend/saas-web/app/view/stock/make/FormPanel.js

@@ -159,14 +159,24 @@ Ext.define('saas.view.stock.make.FormPanel', {
             {
                 text : "数量", 
                 dataIndex : "pd_qty", 
+                width : 120.0,
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8
                 },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null,
-                summaryType: 'sum'
+                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);
+                },
+                summaryType: 'sum',
+                summaryRenderer: 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);
+                }
             },{
                 text : "仓库id",
                 dataIndex : "mm_whid",
@@ -204,7 +214,7 @@ Ext.define('saas.view.stock.make.FormPanel', {
             }, {
                 text : "备注",
                 dataIndex : "mm_remark",
-                width : 120.0,
+                width : 250,
                 hidden:true
             }]
     },{

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

@@ -24,15 +24,17 @@ Ext.define('saas.view.stock.make.FormPanelController', {
             //             },{
             //                 field:'ve_name',width:100
             //             }],
-            //             //联想查询条件
-            //             dbCondition:"CONCAT(ve_code, ve_name) like '{0}%'",
+            //             defaultCondition:"ve_statuscode='OPEN'",
             //             //放大镜窗口字段
             //             dbSearchFields:[{
+            //                 emptyText:'输入仓库编号或名称',
             //                 xtype : "textfield", 
-            //                 name : "ve_name", 
-            //                 conditionExpression:"ve_name like '{0}%'",//传入后台条件  替换占位符
-            //                 fieldLabel : "供应商名称", 
-            //                 columnWidth : 0.25
+            //                 name : "name", 
+            //                 allowBlank : true, 
+            //                 columnWidth : 0.25,
+            //                 getCondition:function(v){
+            //                     return "upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%'";
+            //                 }
             //             }],
             //             //放大镜窗口列表
             //             dbColumns:[{
@@ -64,7 +66,6 @@ Ext.define('saas.view.stock.make.FormPanelController', {
             //                 "items": null
             //             }]
             //         }) ;   
-
             //     }
             // },
             //从表单选放大镜赋值关系 以及 tpl模板
@@ -81,22 +82,23 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         },{
                             from:'pr_unit',to:'pd_unit'
                         }],
-                        //联想查询条件
-                        dbCondition:"CONCAT(pr_code, pr_detail) like '{0}%'",
                         //联想设置
                         dbtpls:[{
                             field:'pr_code',width:100
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition:"pr_statuscode='OPEN'",
                         //窗口字段设置
                         dbSearchFields:[{
-                            emptyText:'输入物料编号或物料名称',
+                            emptyText:'输入仓库编号或名称',
                             xtype : "textfield", 
-                            name : "search", 
-                            conditionExpression:"CONCAT(pr_code, pr_detail) like '{0}%'",
+                            name : "name", 
                             allowBlank : true, 
-                            columnWidth : 0.25
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "(upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            }
                         }],
                         //窗口列设置
                         dbColumns:[{
@@ -136,29 +138,32 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         //数据接口
-                        dataUrl:'http://192.168.253.31:9480/product/getProductsByCondition',
+                        dataUrl:'/api/document/product/list',
+                        addXtype: 'document-product-formpanel',
+                        addTitle: '物料资料',
                         //放大镜赋值设置
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode'
                         },{
                             from:'pr_unit',to:'pd_unit'
                         }],
-                        //联想查询条件
-                        dbCondition:"CONCAT(pr_code, pr_detail) like '{0}%'",
                         //联想设置
                         dbtpls:[{
                             field:'pr_code',width:100
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition:"pr_statuscode='OPEN'",
                         //窗口字段设置
                         dbSearchFields:[{
-                            emptyText:'输入物料编号或物料名称',
+                            emptyText:'输入仓库编号或名称',
                             xtype : "textfield", 
-                            name : "search", 
-                            conditionExpression:"CONCAT(pr_code, pr_detail) like '{0}%'",
+                            name : "name", 
                             allowBlank : true, 
-                            columnWidth : 0.25
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "(upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            }
                         }],
                         //窗口列设置
                         dbColumns:[{

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

@@ -22,10 +22,21 @@ Ext.define('saas.view.stock.make.QueryPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
+                        defaultCondition: "ve_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             conditionCode:'ve_id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "ve_id",
                             "width": 0,
                             "xtype": "",
@@ -76,9 +87,21 @@ Ext.define('saas.view.stock.make.QueryPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "pr_id",
                             "width": 0,
                             "xtype": "",

+ 68 - 22
frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -157,14 +157,25 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
             {
                 text : "数量", 
                 dataIndex : "pd_inqty", 
+                width : 120.0,
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8,
+                    minValue:0
                 },
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                format:'0',
-                items : null,
-                summaryType: 'sum'
+                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);
+                },
+                summaryType: 'sum',
+                summaryRenderer: 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);
+                }
             },{
                 text : "仓库id", 
                 dataIndex : "pd_whid", 
@@ -198,34 +209,69 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
             {
                 text : "单价", 
                 dataIndex : "pd_orderprice",
+                width : 120.0,
                 editor : {
-                    xtype : "numberfield"
-                },   
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                items : null
+                    xtype : "numberfield",
+                    decimalPrecision: 8
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
             }, 
            {
                 text : "含税金额", 
                 dataIndex : "pd_total", 
-                width : 120.0, 
-                xtype : "numbercolumn",
-                summaryType: 'sum'
+                width : 120.0,
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             }, {
                 text : "税率", 
                 dataIndex : "pd_taxrate",
                 editor : {
-                    xtype : "numberfield"
-                },   
-                width : 120.0, 
-                xtype : "numbercolumn", 
-                items : null
+                    xtype : "numberfield",
+                    decimalPrecision: 0,
+                    minValue: 0,
+                    maxValue: 100
+                }
             },
             {
-                text : "未税金额", 
+                text : "未税金额", 
                 dataIndex : "pd_nettotal", 
-                xtype : "numbercolumn",
-                summaryType: 'sum'
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             }
         ]
     }, {

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

@@ -26,23 +26,21 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
-                        //联想查询条件
-                        dbtplfield:"ve_name",
-                        //放大镜窗口字段
+                        defaultCondition: "ve_statuscode='OPEN'",
                         dbSearchFields:[{
                             emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
-                            name : "ve_name", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "ve_name like '%" + v + "%' or ve_code like '%"+ v +"%'";
-                            }
+                            columnWidth : 0.25
                         }],
                         dbColumns:[{
                             conditionCode:'id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
@@ -100,8 +98,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                             field: 'pi_custname',
                             width: 100
                         }],
-                        //联想查询条件
-                        dbtplfield:"cu_name",
+                        defaultCondition:"cu_statuscode='OPEN'",
                         //放大镜窗口字段
                         dbSearchFields:[{
                             emptyText:'输入客户编号或名称',
@@ -110,7 +107,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25,
                             getCondition:function(v){
-                                return "cu_name like '%" + v + "%' or cu_code like '%"+ v +"%'";
+                                return "(upper(cu_name) like '%"+v.toUpperCase()+"%' or upper(cu_code) like '%"+v.toUpperCase()+"%')";
                             }
                         }],
                         dbColumns:[{
@@ -205,23 +202,24 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                             field: 'pr_spec',
                             width: 100
                         }],
-                        //窗口字段设置
+                        defaultCondition: "pr_statuscode='OPEN'",
                         dbSearchFields:[{
-                            emptyText:'输入物料编号或物料名称',
+                            emptyText:'输入物料编号、名称或规格',
                             xtype : "textfield", 
                             name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "pr_code like '%" + v + "%' or pr_detail like '%"+ v +"%'";
-                            }
-                        }],                         
+                            columnWidth : 0.25
+                        }],                        
                         dbColumns:[{
                             "text": "物料ID",
                             "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
-                            "items": null
+                            "hidden": true
                         },{
                             "text": "物料编号",       
                             "dataIndex": "pr_code",
@@ -356,7 +354,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25,
                             getCondition:function(v){
-                                return "wh_code like '%" + v + "%' or wh_description like '%"+ v +"%'";
+                                return "(upper(wh_code) like '%"+v.toUpperCase()+"%' or upper(wh_description) like '%"+v.toUpperCase()+"%')";
                             }
                         }],                        
                         dbColumns: [{

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

@@ -22,10 +22,21 @@ Ext.define('saas.view.stock.otherIn.QueryPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
+                        defaultCondition: "ve_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(ve_code) like '%"+v.toUpperCase()+"%' or upper(ve_name) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             conditionCode:'ve_id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "ve_id",
                             "width": 0,
                             "xtype": "",
@@ -75,9 +86,21 @@ Ext.define('saas.view.stock.otherIn.QueryPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "pr_id",
                             "width": 0,
                             "xtype": "",

+ 74 - 22
frontend/saas-web/app/view/stock/otherOut/FormPanel.js

@@ -153,14 +153,25 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
             {
                 text: "数量",
                 dataIndex: "pd_outqty",
-                editor: {
-                    xtype: "numberfield"
-                },
                 width: 120.0,
-                xtype: "numbercolumn",
-                format: '0',
-                items: null,
-                summaryType: 'sum'
+                editor : {
+                    xtype : "numberfield",
+                    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);
+                },
+                summaryType: 'sum',
+                summaryRenderer: 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);
+                }
             },{
                 text: "仓库id",
                 dataIndex: "pd_whid",
@@ -195,33 +206,74 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                 text: "单价",
                 dataIndex: "pd_orderprice",
                 editor : {
-                    xtype : "numberfield"
-                },  
-                width: 120.0,
-                xtype: "numbercolumn",
-                items: null
+                    xtype : "numberfield",
+                    decimalPrecision: 8
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             },
             {
                 text: "含税金额",
                 dataIndex: "pd_total",
                 width: 120.0,
-                xtype: "numbercolumn",
-                summaryType: 'sum'
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             }, {
                 text: "税率",
                 dataIndex: "pd_taxrate",
                 editor : {
-                    xtype : "numberfield"
-                },  
-                width: 120.0,
-                xtype: "numbercolumn",
-                items: null
+                    xtype : "numberfield",
+                    decimalPrecision: 0,
+                    minValue: 0,
+                    maxValue: 100
+                }
             },
             {
-                text: "未税金额",
+                text: "未税金额",
                 dataIndex: "pd_nettotal",
-                xtype: "numbercolumn",
-                summaryType: 'sum'
+                editor : {
+                    xtype : "numberfield",
+                    decimalPrecision: 2
+                },
+                renderer : function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                },
+                summaryType: 'sum',
+                summaryRenderer: function(v) {
+                    var arr = (v + '.').split('.');
+                    var xr = (new Array(arr[1].length)).fill('0');
+                    var format = '0,000.' + xr.join();
+                    return Ext.util.Format.number(v, format);
+                }
             }
         ]
     }, {

+ 14 - 16
frontend/saas-web/app/view/stock/otherOut/FormPanelController.js

@@ -26,8 +26,6 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
-                        //联想查询条件
-                        dbtplfield:"ve_name",
                         //放大镜窗口字段
                         dbSearchFields:[{
                             emptyText:'输入供应商编号或名称',
@@ -36,13 +34,13 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25,
                             getCondition:function(v){
-                                return "ve_name like '%" + v + "%' or ve_code like '%"+ v +"%'";
+                                return "(upper(ve_name) like '%"+v.toUpperCase()+"%' or upper(ve_code) like '%"+v.toUpperCase()+"%')";
                             }
                         }],                        
                         dbColumns:[{
                             conditionCode:'id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
@@ -95,8 +93,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         },{
                             field:'pi_custname',width:100
                         }],
-                        //联想查询条件
-                        dbtplfield:"cu_name",
+                        defaultCondition:"pi_statuscode='OPEN'",
                         //放大镜窗口字段
                         dbSearchFields:[{
                             emptyText:'输入客户编号或名称',
@@ -105,7 +102,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25,
                             getCondition:function(v){
-                                return "cu_name like '%" + v + "%' or cu_code like '%"+ v +"%'";
+                                return "(upper(cu_name) like '%"+v.toUpperCase()+"%' or upper(cu_code) like '%"+v.toUpperCase()+"%')";
                             }
                         }],
                         dbColumns:[{
@@ -193,23 +190,24 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         },{
                             field:'pr_spec',width:100
                         }],
-                        //窗口字段设置
+                        defaultCondition: "pr_statuscode='OPEN'",
                         dbSearchFields:[{
-                            emptyText:'输入物料编号或物料名称',
+                            emptyText:'输入物料编号、名称或规格',
                             xtype : "textfield", 
                             name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "pr_code like '%" + v + "%' or pr_detail like '%"+ v +"%'";
-                            }
-                        }],                        
+                            columnWidth : 0.25
+                        }],                      
                         dbColumns:[{
                             "text": "物料ID",
                             "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
-                            "items": null
+                            "hidden": true
                         },{
                             "text": "物料编号",       
                             "dataIndex": "pr_code",
@@ -340,7 +338,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25,
                             getCondition:function(v){
-                                return "wh_code like '%" + v + "%' or wh_description like '%"+ v +"%'";
+                                return "(upper(wh_code) like '%"+v.toUpperCase()+"%' or upper(wh_description) like '%"+v.toUpperCase()+"%')";
                             }
                         }],                        
                         dbColumns:[{

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

@@ -25,7 +25,7 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                         dbColumns:[{
                             conditionCode:'ve_id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "ve_id",
                             "width": 0,
                             "xtype": "",
@@ -75,9 +75,21 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
+                        defaultCondition: "pr_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号、名称或规格',
+                            xtype : "textfield", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            columnWidth : 0.25
+                        }],
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "pr_id",
                             "width": 0,
                             "xtype": "",

+ 12 - 6
frontend/saas-web/app/view/sys/config/FormPanel.js

@@ -25,13 +25,19 @@ Ext.define('saas.view.sys.config.FormPanel', {
         columnWidth: 0.25,
         blankText: '该字段不能为空'
     },
-    
-    tbar:[{
-        text:'保存',
-        handler:function(){
 
-        }
-    }],
+    tbar:{
+        style: {
+            'border-bottom': '1px solid #35baf6 !important'
+        },
+        frame:true,
+        items:['->',{
+            text:'保存',
+            handler:function(){
+
+            }
+        }]
+    },
 
     items: [{
         xtype: 'hidden',

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

@@ -17,7 +17,7 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
 
     tbar: [{
         width: 150,
-        name: 'mn_caller',
+        name: 'mn_name',
         xtype: 'textfield',
         emptyText : '单据名称'
     },{
@@ -81,7 +81,7 @@ Ext.define('saas.view.sys.maxnumbers.DataList', {
     },{
         text : "单据名称", 
         width : 200.0, 
-        dataIndex : "mn_caller", 
+        dataIndex : "mn_name", 
         xtype : "", 
     }, 
     {

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

@@ -11,7 +11,7 @@ Ext.define('saas.view.sys.messagelog.DataList', {
         width: 150,
         name: 'ml_name',
         xtype: 'textfield',
-        emptyText : '单据类'
+        emptyText : '单据类'
     },{
         width: 150,
         name: 'ml_code',
@@ -52,7 +52,7 @@ Ext.define('saas.view.sys.messagelog.DataList', {
         dataIndex : "id", 
         xtype : "numbercolumn",   
     },{
-        text:'单据类',
+        text:'单据类',
         dataIndex : "ml_name",
         width : 120.0, 
     },{

+ 5 - 3
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/field/Number.js

@@ -3,10 +3,12 @@
  * 2017年10月12日
  */
 Ext.define('Ext.locale.zh_CN.field.Number', {
-    override: 'Ext.field.Number',
+    override: 'Ext.form.field.Number',
 
     decimalsText: '最大小数位数为 {0}',
-    minValueText: '该输入项的最小值是 {0}',
-    maxValueText: '该输入项的最大值是 {0}',
+    minText: '该输入项的最小值是 {0}',
+    maxText: '该输入项的最大值是 {0}',
+    nanText: '{0} 不是一个合法的数字',
+    negativeText: '该值不能为负',
     badFormatMessage: '不是一个有效的数值'
 });

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

@@ -3,7 +3,9 @@
  * 2017年10月12日
  */
 Ext.define('Ext.locale.zh_CN.field.Text', {
-    override: 'Ext.field.Text',
+    override: 'Ext.form.field.Text',
+
+    maxLengthText: '字段长度不能超过 {0}个字符',
 
     config: {
         requiredMessage: '必填项',

+ 10 - 0
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/window/MessageBox.js

@@ -0,0 +1,10 @@
+Ext.define('Ext.locale.zh_CN.window.MessageBox', {
+    override: 'Ext.window.MessageBox',
+
+    buttonText: {
+        ok: 'OK',
+        yes: '是',
+        no: '否',
+        cancel: '取消'
+    }
+});

+ 7 - 0
frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/window/Window.js

@@ -0,0 +1,7 @@
+Ext.define('Ext.locale.zh_CN.window.Window', {
+    override: 'Ext.window.Window',
+
+    config: {
+        closeToolText: '关闭面板'
+    }
+});

+ 1 - 1
frontend/saas-web/overrides/data/Connection.js

@@ -22,7 +22,7 @@ Ext.define('saas.override.data.Connection', {
               (!serverOptions.urlPattern || new RegExp(serverOptions.urlPattern).test(originUrl))) {
                 Ext.Object.merge(options, {
                     url: serverOptions.basePath + (originUrl.indexOf('/') == 0 ? '' : '/') + originUrl,
-                    headers: this.getDefaultServerHeaders()
+                    headers: this.getDefaultServerHeaders() || {}
                 });
             }
         }