Browse Source

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

hy 8 years ago
parent
commit
9a04429735
90 changed files with 2367 additions and 849 deletions
  1. 118 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Enterprise.java
  2. 10 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Operation.java
  3. 2 4
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/config/WebConfig.java
  4. 1 1
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/EndProductController.java
  5. 30 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/EnterpriseController.java
  6. 14 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/EnterpriseMapper.java
  7. 12 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/EnterpriseService.java
  8. 35 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/EnterpriseServiceImpl.java
  9. 1 0
      applications/commons/commons-server/src/main/resources/i18n/messages_zh_CN.properties
  10. 156 0
      applications/commons/commons-server/src/main/resources/mapper/EnterpriseMapper.xml
  11. 120 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProductReserveCostDTO.java
  12. 3 3
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendorcontact.java
  13. 3 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/config/WebConfig.java
  14. 7 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java
  15. 3 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductMapper.java
  16. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductService.java
  17. 25 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  18. 23 0
      applications/document/document-server/src/main/resources/mapper/ProductMapper.xml
  19. 6 6
      applications/document/document-server/src/main/resources/mapper/VendorcontactMapper.xml
  20. 2 4
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/config/WebConfig.java
  21. 1 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  22. 1 1
      applications/money/money-server/src/main/resources/mapper/RecbalancedetMapper.xml
  23. 4 4
      applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml
  24. 3 5
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/config/WebConfig.java
  25. 2 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/ProdIODetailMapper.java
  26. 2 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/ProdInOutService.java
  27. 6 7
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  28. 3 4
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  29. 3 4
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/config/WebConfig.java
  30. 25 12
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  31. 1 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  32. 4 3
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml
  33. 4 0
      base-servers/account/account-server/pom.xml
  34. 2 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/AccountApplication.java
  35. 18 1
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/AccountController.java
  36. 4 2
      base-servers/account/account-server/src/main/resources/application.yml
  37. 8 1
      base-servers/auth/auth-client/src/main/java/com/usoftchina/saas/auth/client/configuration/AuthAutoConfiguration.java
  38. 8 6
      base-servers/auth/auth-client/src/main/java/com/usoftchina/saas/auth/client/interceptor/AuthRestInterceptor.java
  39. 0 1
      base-servers/ui-server/src/main/java/com/usoftchina/saas/ui/controller/co/CoViewController.java
  40. 0 3
      base-servers/ui-server/src/main/java/com/usoftchina/saas/ui/service/co/CoViewService.java
  41. 2 2
      frontend/saas-web/app/model/sale/Saledetail.js
  42. 2 2
      frontend/saas-web/app/model/stock/Makematerial.js
  43. 1 1
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  44. 1 1
      frontend/saas-web/app/view/core/dbfind/MultiDbfindTrigger.js
  45. 13 9
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  46. 11 0
      frontend/saas-web/app/view/core/query/QueryGridPanel.scss
  47. 19 2
      frontend/saas-web/app/view/core/query/QueryPanel.js
  48. 32 17
      frontend/saas-web/app/view/document/kind/ChildForm.js
  49. 16 6
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  50. 7 2
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  51. 18 21
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  52. 0 1
      frontend/saas-web/app/view/money/othreceipts/QueryPanel.js
  53. 36 18
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  54. 12 1
      frontend/saas-web/app/view/money/othspendings/FormPanelController.js
  55. 7 2
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  56. 31 15
      frontend/saas-web/app/view/money/othspendings/QueryPanelController.js
  57. 83 11
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  58. 49 66
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  59. 42 15
      frontend/saas-web/app/view/money/payBalance/QueryPanelController.js
  60. 81 10
      frontend/saas-web/app/view/money/recBalance/FormPanel.js
  61. 55 31
      frontend/saas-web/app/view/money/recBalance/FormPanelController.js
  62. 42 15
      frontend/saas-web/app/view/money/recBalance/QueryPanelController.js
  63. 95 30
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  64. 31 16
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  65. 0 1
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  66. 42 15
      frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js
  67. 80 53
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  68. 38 22
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  69. 42 15
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js
  70. 5 2
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  71. 37 21
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  72. 42 15
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js
  73. 88 28
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  74. 2 2
      frontend/saas-web/app/view/sale/sale/QueryPanel.js
  75. 67 18
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  76. 65 21
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  77. 16 6
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js
  78. 46 49
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js
  79. 42 15
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanelController.js
  80. 17 7
      frontend/saas-web/app/view/stock/make/FormPanel.js
  81. 42 15
      frontend/saas-web/app/view/stock/make/QueryPanelController.js
  82. 69 22
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  83. 44 46
      frontend/saas-web/app/view/stock/otherIn/FormPanelController.js
  84. 42 15
      frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js
  85. 75 22
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  86. 41 43
      frontend/saas-web/app/view/stock/otherOut/FormPanelController.js
  87. 42 15
      frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js
  88. 5 3
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/field/Number.js
  89. 3 1
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/field/Text.js
  90. 10 0
      frontend/saas-web/ext/packages/modern-locale/overrides/zh_CN/window/MessageBox.js

+ 118 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Enterprise.java

@@ -0,0 +1,118 @@
+package com.usoftchina.saas.commons.po;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Enterprise extends CommonBaseEntity implements Serializable {
+    private String en_name;
+
+    private String en_address;
+
+    private String en_tel;
+
+    private String en_fax;
+
+    private String en_postcodes;
+
+    private Date en_begindate;
+
+    private String en_pricemethod;
+
+    private Integer en_recorderid;
+
+    private String en_recorder;
+
+    private Date en_recorddate;
+
+    private byte[] en_signet;
+
+    public String getEn_name() {
+        return en_name;
+    }
+
+    public void setEn_name(String en_name) {
+        this.en_name = en_name;
+    }
+
+    public String getEn_address() {
+        return en_address;
+    }
+
+    public void setEn_address(String en_address) {
+        this.en_address = en_address;
+    }
+
+    public String getEn_tel() {
+        return en_tel;
+    }
+
+    public void setEn_tel(String en_tel) {
+        this.en_tel = en_tel;
+    }
+
+    public String getEn_fax() {
+        return en_fax;
+    }
+
+    public void setEn_fax(String en_fax) {
+        this.en_fax = en_fax;
+    }
+
+    public String getEn_postcodes() {
+        return en_postcodes;
+    }
+
+    public void setEn_postcodes(String en_postcodes) {
+        this.en_postcodes = en_postcodes;
+    }
+
+    public Date getEn_begindate() {
+        return en_begindate;
+    }
+
+    public void setEn_begindate(Date en_begindate) {
+        this.en_begindate = en_begindate;
+    }
+
+    public String getEn_pricemethod() {
+        return en_pricemethod;
+    }
+
+    public void setEn_pricemethod(String en_pricemethod) {
+        this.en_pricemethod = en_pricemethod;
+    }
+
+    public Integer getEn_recorderid() {
+        return en_recorderid;
+    }
+
+    public void setEn_recorderid(Integer en_recorderid) {
+        this.en_recorderid = en_recorderid;
+    }
+
+    public String getEn_recorder() {
+        return en_recorder;
+    }
+
+    public void setEn_recorder(String en_recorder) {
+        this.en_recorder = en_recorder;
+    }
+
+    public Date getEn_recorddate() {
+        return en_recorddate;
+    }
+
+    public void setEn_recorddate(Date en_recorddate) {
+        this.en_recorddate = en_recorddate;
+    }
+
+    public byte[] getEn_signet() {
+        return en_signet;
+    }
+
+    public void setEn_signet(byte[] en_signet) {
+        this.en_signet = en_signet;
+    }
+}

+ 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;

+ 2 - 4
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/config/WebConfig.java

@@ -8,7 +8,7 @@ import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.http.converter.StringHttpMessageConverter;
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
 import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
@@ -21,7 +21,7 @@ import java.util.List;
  **/
 
 @Configuration
-public class WebConfig extends WebMvcConfigurationSupport{
+public class WebConfig implements WebMvcConfigurer {
     @Bean
     public HttpMessageConverter<String> responseBodyConverter() {
         StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
@@ -40,7 +40,6 @@ public class WebConfig extends WebMvcConfigurationSupport{
 
     @Override
     public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
-        super.configureMessageConverters(converters);
         converters.add(responseBodyConverter());
         converters.add(MappingJacksonHttpMessageConverter());
     }
@@ -49,5 +48,4 @@ public class WebConfig extends WebMvcConfigurationSupport{
     public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
         configurer.favorPathExtension(false);
     }
-
 }

+ 1 - 1
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/EndProductController.java

@@ -30,7 +30,7 @@ public class EndProductController {
 
     @PostMapping("/unEndAccount")
     public Result unEndAccount(){
-
+        endProductService.unEndAccount();
         return Result.success();
     }
 

+ 30 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/EnterpriseController.java

@@ -0,0 +1,30 @@
+package com.usoftchina.saas.commons.controller;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.po.Enterprise;
+import com.usoftchina.saas.commons.service.EnterpriseService;
+import com.usoftchina.saas.context.BaseContextHolder;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/enterprise")
+public class EnterpriseController {
+
+    @Autowired
+    private EnterpriseService enterpriseService;
+
+    @GetMapping("/read")
+    public Result getList(){
+        enterpriseService.findByPrimaryKey(BaseContextHolder.getCompanyId());
+        return Result.success();
+    }
+
+    @PostMapping("/save")
+    public Result save(@RequestBody Enterprise enterprise){
+        DocBaseDTO docBaseDTO = enterpriseService.saveData(enterprise);
+        return Result.success(docBaseDTO);
+    }
+
+}

+ 14 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/EnterpriseMapper.java

@@ -0,0 +1,14 @@
+package com.usoftchina.saas.commons.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.commons.po.Enterprise;
+
+public interface EnterpriseMapper extends CommonBaseMapper<Enterprise> {
+
+    int insertSelective(Enterprise record);
+
+    Enterprise selectByPrimaryKey(Long id);
+
+    int updateByPrimaryKeySelective(Enterprise record);
+
+}

+ 12 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/EnterpriseService.java

@@ -0,0 +1,12 @@
+package com.usoftchina.saas.commons.service;
+
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.mapper.EnterpriseMapper;
+import com.usoftchina.saas.commons.po.Enterprise;
+
+public interface EnterpriseService extends CommonBaseService<EnterpriseMapper, Enterprise> {
+
+    DocBaseDTO saveData(Enterprise enterprise);
+
+}

+ 35 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/EnterpriseServiceImpl.java

@@ -0,0 +1,35 @@
+package com.usoftchina.saas.commons.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.commons.exception.BizExceptionCode;
+import com.usoftchina.saas.commons.mapper.EnterpriseMapper;
+import com.usoftchina.saas.commons.po.Enterprise;
+import com.usoftchina.saas.commons.service.EnterpriseService;
+import com.usoftchina.saas.commons.service.MessageLogService;
+import com.usoftchina.saas.exception.BizException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class EnterpriseServiceImpl extends CommonBaseServiceImpl<EnterpriseMapper, Enterprise> implements EnterpriseService {
+
+    @Autowired
+    private MessageLogService messageLogService;
+
+    @Override
+    public DocBaseDTO saveData(Enterprise enterprise) {
+        if (enterprise.getCompanyId() == 0){
+            throw new BizException(BizExceptionCode.ILLEGAL_ID);
+        }
+        getMapper().updateByPrimaryKeySelective(enterprise);
+        DocBaseDTO docBaseDTO = generateMsgObj(enterprise.getCompanyId());
+        messageLogService.update(docBaseDTO);
+        return docBaseDTO;
+    }
+
+    private DocBaseDTO generateMsgObj(Long id){
+        return new DocBaseDTO(id, null, "Enterprise");
+    }
+
+}

+ 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

+ 156 - 0
applications/commons/commons-server/src/main/resources/mapper/EnterpriseMapper.xml

@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.saas.commons.mapper.EnterpriseMapper" >
+    <resultMap id="BaseResultMap" type="com.usoftchina.saas.commons.po.Enterprise" >
+        <id column="companyId" property="companyId" jdbcType="INTEGER" />
+        <result column="en_name" property="en_name" jdbcType="VARCHAR" />
+        <result column="en_address" property="en_address" jdbcType="VARCHAR" />
+        <result column="en_tel" property="en_tel" jdbcType="VARCHAR" />
+        <result column="en_fax" property="en_fax" jdbcType="VARCHAR" />
+        <result column="en_postcodes" property="en_postcodes" jdbcType="VARCHAR" />
+        <result column="en_begindate" property="en_begindate" jdbcType="TIMESTAMP" />
+        <result column="en_pricemethod" property="en_pricemethod" jdbcType="VARCHAR" />
+        <result column="en_recorderid" property="en_recorderid" jdbcType="INTEGER" />
+        <result column="en_recorder" property="en_recorder" jdbcType="VARCHAR" />
+        <result column="en_recorddate" property="en_recorddate" jdbcType="TIMESTAMP" />
+        <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+        <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    </resultMap>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap">
+        SELECT * FROM ENTERPRISE WHERE companyId=#{id}
+    </select>
+
+    <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.Enterprise" >
+        <selectKey resultType="java.lang.Long" keyProperty="id">
+            SELECT LAST_INSERT_ID() AS ID
+        </selectKey>
+        insert into enterprise
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+            <if test="en_name != null" >
+                en_name,
+            </if>
+            <if test="en_address != null" >
+                en_address,
+            </if>
+            <if test="en_tel != null" >
+                en_tel,
+            </if>
+            <if test="en_fax != null" >
+                en_fax,
+            </if>
+            <if test="en_postcodes != null" >
+                en_postcodes,
+            </if>
+            <if test="en_begindate != null" >
+                en_begindate,
+            </if>
+            <if test="en_pricemethod != null" >
+                en_pricemethod,
+            </if>
+            <if test="en_recorderid != null" >
+                en_recorderid,
+            </if>
+            <if test="en_recorder != null" >
+                en_recorder,
+            </if>
+            <if test="en_recorddate != null" >
+                en_recorddate,
+            </if>
+            <if test="updaterId != null" >
+                updaterId,
+            </if>
+            <if test="updateTime != null" >
+                updateTime,
+            </if>
+            <if test="en_signet != null" >
+                en_signet,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+            <if test="en_name != null" >
+                #{en_name,jdbcType=VARCHAR},
+            </if>
+            <if test="en_address != null" >
+                #{en_address,jdbcType=VARCHAR},
+            </if>
+            <if test="en_tel != null" >
+                #{en_tel,jdbcType=VARCHAR},
+            </if>
+            <if test="en_fax != null" >
+                #{en_fax,jdbcType=VARCHAR},
+            </if>
+            <if test="en_postcodes != null" >
+                #{en_postcodes,jdbcType=VARCHAR},
+            </if>
+            <if test="en_begindate != null" >
+                #{en_begindate,jdbcType=TIMESTAMP},
+            </if>
+            <if test="en_pricemethod != null" >
+                #{en_pricemethod,jdbcType=VARCHAR},
+            </if>
+            <if test="en_recorderid != null" >
+                #{en_recorderid,jdbcType=INTEGER},
+            </if>
+            <if test="en_recorder != null" >
+                #{en_recorder,jdbcType=VARCHAR},
+            </if>
+            <if test="en_recorddate != null" >
+                #{en_recorddate,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updaterId != null" >
+                #{updaterId,jdbcType=INTEGER},
+            </if>
+            <if test="updateTime != null" >
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="en_signet != null" >
+                #{en_signet,jdbcType=LONGVARBINARY},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.commons.po.Enterprise" >
+        update enterprise
+        <set >
+            <if test="en_name != null" >
+                en_name = #{en_name,jdbcType=VARCHAR},
+            </if>
+            <if test="en_address != null" >
+                en_address = #{en_address,jdbcType=VARCHAR},
+            </if>
+            <if test="en_tel != null" >
+                en_tel = #{en_tel,jdbcType=VARCHAR},
+            </if>
+            <if test="en_fax != null" >
+                en_fax = #{en_fax,jdbcType=VARCHAR},
+            </if>
+            <if test="en_postcodes != null" >
+                en_postcodes = #{en_postcodes,jdbcType=VARCHAR},
+            </if>
+            <if test="en_begindate != null" >
+                en_begindate = #{en_begindate,jdbcType=TIMESTAMP},
+            </if>
+            <if test="en_pricemethod != null" >
+                en_pricemethod = #{en_pricemethod,jdbcType=VARCHAR},
+            </if>
+            <if test="en_recorderid != null" >
+                en_recorderid = #{en_recorderid,jdbcType=INTEGER},
+            </if>
+            <if test="en_recorder != null" >
+                en_recorder = #{en_recorder,jdbcType=VARCHAR},
+            </if>
+            <if test="en_recorddate != null" >
+                en_recorddate = #{en_recorddate,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updaterId != null" >
+                updaterId = #{updaterId,jdbcType=INTEGER},
+            </if>
+            <if test="updateTime != null" >
+                updateTime = #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="en_signet != null" >
+                en_signet = #{en_signet,jdbcType=LONGVARBINARY},
+            </if>
+        </set>
+        where companyId = #{companyId}
+    </update>
+</mapper>

+ 120 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProductReserveCostDTO.java

@@ -0,0 +1,120 @@
+package com.usoftchina.saas.document.dto;
+
+import com.usoftchina.saas.base.dto.CommonBaseDTO;
+
+import java.io.Serializable;
+
+/**
+ * 物料库存数量金额表
+ */
+public class ProductReserveCostDTO extends CommonBaseDTO implements Serializable {
+
+    /**
+     * 物料编号
+     */
+    private String rc_prodCode;
+    /**
+     * 物料名称
+     */
+    private String rc_prodDetail;
+    /**
+     * 物料规格
+     */
+    private String rc_prodSpec;
+    /**
+     * 物料单位
+     */
+    private String rc_prodUnit;
+    /**
+     * 仓库编号
+     */
+    private String rc_whCode;
+    /**
+     * 仓库名称
+     */
+    private String rc_whName;
+    /**
+     * 数量
+     */
+    private String rc_number;
+    /**
+     * 单价
+     */
+    private String rc_price;
+    /**
+     * 金额
+     */
+    private String rc_amount;
+
+    public String getRc_prodCode() {
+        return rc_prodCode;
+    }
+
+    public void setRc_prodCode(String rc_prodCode) {
+        this.rc_prodCode = rc_prodCode;
+    }
+
+    public String getRc_prodDetail() {
+        return rc_prodDetail;
+    }
+
+    public void setRc_prodDetail(String rc_prodDetail) {
+        this.rc_prodDetail = rc_prodDetail;
+    }
+
+    public String getRc_prodSpec() {
+        return rc_prodSpec;
+    }
+
+    public void setRc_prodSpec(String rc_prodSpec) {
+        this.rc_prodSpec = rc_prodSpec;
+    }
+
+    public String getRc_prodUnit() {
+        return rc_prodUnit;
+    }
+
+    public void setRc_prodUnit(String rc_prodUnit) {
+        this.rc_prodUnit = rc_prodUnit;
+    }
+
+    public String getRc_whCode() {
+        return rc_whCode;
+    }
+
+    public void setRc_whCode(String rc_whCode) {
+        this.rc_whCode = rc_whCode;
+    }
+
+    public String getRc_whName() {
+        return rc_whName;
+    }
+
+    public void setRc_whName(String rc_whName) {
+        this.rc_whName = rc_whName;
+    }
+
+    public String getRc_number() {
+        return rc_number;
+    }
+
+    public void setRc_number(String rc_number) {
+        this.rc_number = rc_number;
+    }
+
+    public String getRc_price() {
+        return rc_price;
+    }
+
+    public void setRc_price(String rc_price) {
+        this.rc_price = rc_price;
+    }
+
+    public String getRc_amount() {
+        return rc_amount;
+    }
+
+    public void setRc_amount(String rc_amount) {
+        this.rc_amount = rc_amount;
+    }
+}

+ 3 - 3
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Vendorcontact.java

@@ -12,7 +12,7 @@ public class Vendorcontact extends CommonBaseEntity implements Serializable {
 
     private String vc_name;
 
-    private Long vc_tel;
+    private String vc_tel;
 
     private String vc_qq;
 
@@ -54,11 +54,11 @@ public class Vendorcontact extends CommonBaseEntity implements Serializable {
         this.vc_name = vc_name;
     }
 
-    public Long getVc_tel() {
+    public String getVc_tel() {
         return vc_tel;
     }
 
-    public void setVc_tel(Long vc_tel) {
+    public void setVc_tel(String vc_tel) {
         this.vc_tel = vc_tel;
     }
 

+ 3 - 4
applications/document/document-server/src/main/java/com/usoftchina/saas/document/config/WebConfig.java

@@ -8,7 +8,7 @@ import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.http.converter.StringHttpMessageConverter;
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
 import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
@@ -21,7 +21,7 @@ import java.util.List;
  **/
 
 @Configuration
-public class WebConfig extends WebMvcConfigurationSupport{
+public class WebConfig implements WebMvcConfigurer {
     @Bean
     public HttpMessageConverter<String> responseBodyConverter() {
         StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
@@ -40,7 +40,6 @@ public class WebConfig extends WebMvcConfigurationSupport{
 
     @Override
     public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
-        super.configureMessageConverters(converters);
         converters.add(responseBodyConverter());
         converters.add(MappingJacksonHttpMessageConverter());
     }
@@ -49,6 +48,6 @@ public class WebConfig extends WebMvcConfigurationSupport{
     public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
         configurer.favorPathExtension(false);
     }
-
 }
 
+

+ 7 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java

@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-@CrossOrigin
+
 @RestController
 @RequestMapping("/product")
 public class ProductController {
@@ -98,4 +98,10 @@ public class ProductController {
         return Result.success(map);
     }
 
+    @GetMapping("ReserveCost")
+    public Result getReserveCost(PageRequest page, ListReqDTO listReqDTO){
+        productService.getReserveCost(page, listReqDTO);
+        return Result.success();
+    }
+
 }

+ 3 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductMapper.java

@@ -3,6 +3,7 @@ package com.usoftchina.saas.document.mapper;
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
+import com.usoftchina.saas.document.dto.ProductReserveCostDTO;
 import com.usoftchina.saas.document.entities.Product;
 import org.apache.ibatis.annotations.Param;
 
@@ -21,4 +22,6 @@ public interface ProductMapper extends CommonBaseMapper<Product> {
     int validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id, @Param("companyId") Long company);
 
     String getCodeById(@Param("id") Long id);
+
+    List<ProductReserveCostDTO> selectReserveCost(@Param("con") String con, @Param("companyId") Long companyId);
 }

+ 9 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductService.java

@@ -9,6 +9,7 @@ import com.usoftchina.saas.commons.dto.ComboDTO;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
+import com.usoftchina.saas.document.dto.ProductReserveCostDTO;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.mapper.ProductMapper;
 
@@ -93,4 +94,12 @@ public interface ProductService extends CommonBaseService<ProductMapper, Product
      * @return
      */
     Product getDataById(Long id);
+
+    /**
+     * 物料库存数量金额表
+     * @param page
+     * @param listReqDTO
+     * @return
+     */
+    PageInfo<ProductReserveCostDTO> getReserveCost(PageRequest page, ListReqDTO listReqDTO);
 }

+ 25 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java

@@ -14,6 +14,7 @@ import com.usoftchina.saas.commons.po.BillCodeSeq;
 import com.usoftchina.saas.commons.po.Status;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.dto.ProductDTO;
+import com.usoftchina.saas.document.dto.ProductReserveCostDTO;
 import com.usoftchina.saas.document.entities.Product;
 import com.usoftchina.saas.document.mapper.ProductMapper;
 import com.usoftchina.saas.document.service.ProductService;
@@ -180,6 +181,30 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         return getMapper().selectByPrimaryKey(id);
     }
 
+    @Override
+    public PageInfo<ProductReserveCostDTO> getReserveCost(PageRequest page, ListReqDTO listReqDTO) {
+        //设置分页
+        if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
+            page = new PageRequest();
+            page.setNumber(1);
+            page.setSize(10);
+        }
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        List<ProductReserveCostDTO> reserveCostList = geReserveCost(listReqDTO);
+        //取分页信息
+        PageInfo<ProductReserveCostDTO> pageInfo = new PageInfo<ProductReserveCostDTO>(reserveCostList);
+        return pageInfo;
+    }
+
+    private List<ProductReserveCostDTO> geReserveCost(ListReqDTO listReqDTO) {
+        Long companyId = BaseContextHolder.getCompanyId();
+        String condition = listReqDTO.getFinalCondition();
+        if(condition == null){
+            condition = "1=1";
+        }
+        return getMapper().selectReserveCost(condition, companyId);
+    }
+
     private List<ProductDTO> getList(ListReqDTO listReqDTO){
         Long companyId = BaseContextHolder.getCompanyId();
         String condition = listReqDTO.getFinalCondition();

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

@@ -466,5 +466,28 @@
         where pr_id = #{id}
     </update>
 
+    <resultMap id="ProdReserveCostResultMap" type="com.usoftchina.saas.document.dto.ProductReserveCostDTO">
+        <result column="pr_code" property="rc_prodCode" jdbcType="VARCHAR" />
+        <result column="pr_spec" property="rc_prodSpec" jdbcType="VARCHAR" />
+        <result column="pr_detail" property="rc_prodDetail" jdbcType="VARCHAR" />
+        <result column="pr_unit" property="rc_prodUnit" jdbcType="VARCHAR" />
+        <result column="wh_code" property="rc_whCode" jdbcType="VARCHAR" />
+        <result column="wh_name" property="rc_whName" jdbcType="VARCHAR" />
+        <result column="pw_onhand" property="rc_number" jdbcType="DOUBLE" />
+        <result column="pw_avprice" property="rc_price" jdbcType="DOUBLE" />
+        <result column="pw_amount" property="rc_amount" jdbcType="DOOUBLE" />
+    </resultMap>
+    <select id="selectReserveCost" resultMap="ProdReserveCostResultMap">
+        select * from productWH tab left join Product on pw_prodcode=pr_code left join warehouse on pw_whcode=wh_code
+        <where>
+          <if test="con!=null">
+              ${con}
+          </if>
+          <if test="companyId!=null">
+              and tab.companyId=#{companyId} and Product.companyId=#{companyId} and warehouse.companyId=#{companyId}
+          </if>
+        </where>
+        ORDER BY PR_ID DESC
+    </select>
 </mapper>
 

+ 6 - 6
applications/document/document-server/src/main/resources/mapper/VendorcontactMapper.xml

@@ -51,7 +51,7 @@
       vc_text3, vc_text4, vc_text5, vc_default
       )
     values (#{vc_veid}, #{vc_detno,jdbcType=INTEGER},
-      #{vc_name,jdbcType=VARCHAR}, #{vc_tel}, #{vc_qq,jdbcType=VARCHAR},
+      #{vc_name,jdbcType=VARCHAR}, #{vc_tel,jdbcType=VARCHAR}, #{vc_qq,jdbcType=VARCHAR},
       #{vc_email,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, 
       #{updateTime,jdbcType=TIMESTAMP}, #{vc_text1,jdbcType=VARCHAR}, #{vc_text2,jdbcType=VARCHAR}, 
       #{vc_text3,jdbcType=VARCHAR}, #{vc_text4,jdbcType=VARCHAR}, #{vc_text5,jdbcType=VARCHAR},
@@ -118,7 +118,7 @@
         #{vc_name,jdbcType=VARCHAR},
       </if>
       <if test="vc_tel != null" >
-        #{vc_tel},
+        #{vc_tel,jdbcType=VARCHAR},
       </if>
       <if test="vc_qq != null" >
         #{vc_qq,jdbcType=VARCHAR},
@@ -168,7 +168,7 @@
         vc_name = #{vc_name,jdbcType=VARCHAR},
       </if>
       <if test="vc_tel != null" >
-        vc_tel = #{vc_tel},
+        vc_tel = #{vc_tel,jdbcType=VARCHAR},
       </if>
       <if test="vc_qq != null" >
         vc_qq = #{vc_qq,jdbcType=VARCHAR},
@@ -211,7 +211,7 @@
     set vc_veid = #{vc_veid},
       vc_detno = #{vc_detno,jdbcType=INTEGER},
       vc_name = #{vc_name,jdbcType=VARCHAR},
-      vc_tel = #{vc_tel},
+      vc_tel = #{vc_tel,jdbcType=VARCHAR},
       vc_qq = #{vc_qq,jdbcType=VARCHAR},
       vc_email = #{vc_email,jdbcType=VARCHAR},
       companyId = #{companyId,jdbcType=INTEGER},
@@ -236,7 +236,7 @@
     <foreach collection="list" item="item" index="index" open="" close="" separator=",">
       (
       #{item.vc_veid}, #{item.vc_detno,jdbcType=INTEGER},
-      #{item.vc_name,jdbcType=VARCHAR}, #{item.vc_tel}, #{item.vc_qq,jdbcType=VARCHAR},
+      #{item.vc_name,jdbcType=VARCHAR}, #{item.vc_tel,jdbcType=VARCHAR}, #{item.vc_qq,jdbcType=VARCHAR},
       #{item.vc_email,jdbcType=VARCHAR}, #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER},
       #{item.updateTime,jdbcType=TIMESTAMP}, #{item.vc_text1,jdbcType=VARCHAR}, #{item.vc_text2,jdbcType=VARCHAR},
       #{item.vc_text3,jdbcType=VARCHAR}, #{item.vc_text4,jdbcType=VARCHAR}, #{item.vc_text5,jdbcType=VARCHAR},
@@ -255,7 +255,7 @@
           vc_name = #{item.vc_name,jdbcType=VARCHAR},
         </if>
         <if test="item.vc_tel != null" >
-          vc_tel = #{item.vc_tel},
+          vc_tel = #{item.vc_tel,jdbcType=VARCHAR},
         </if>
         <if test="item.vc_qq != null" >
           vc_qq = #{item.vc_qq,jdbcType=VARCHAR},

+ 2 - 4
applications/money/money-server/src/main/java/com/usoftchina/saas/money/config/WebConfig.java

@@ -8,7 +8,7 @@ import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.http.converter.StringHttpMessageConverter;
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
 import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
@@ -21,7 +21,7 @@ import java.util.List;
  **/
 
 @Configuration
-public class WebConfig extends WebMvcConfigurationSupport{
+public class WebConfig implements WebMvcConfigurer {
     @Bean
     public HttpMessageConverter<String> responseBodyConverter() {
         StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
@@ -40,7 +40,6 @@ public class WebConfig extends WebMvcConfigurationSupport{
 
     @Override
     public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
-        super.configureMessageConverters(converters);
         converters.add(responseBodyConverter());
         converters.add(MappingJacksonHttpMessageConverter());
     }
@@ -49,6 +48,5 @@ public class WebConfig extends WebMvcConfigurationSupport{
     public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
         configurer.favorPathExtension(false);
     }
-
 }
 

+ 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);

+ 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},

+ 3 - 5
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/config/WebConfig.java

@@ -8,7 +8,7 @@ import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.http.converter.StringHttpMessageConverter;
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
 import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
@@ -21,7 +21,7 @@ import java.util.List;
  **/
 
 @Configuration
-public class WebConfig extends WebMvcConfigurationSupport{
+public class WebConfig implements WebMvcConfigurer {
     @Bean
     public HttpMessageConverter<String> responseBodyConverter() {
         StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
@@ -40,7 +40,6 @@ public class WebConfig extends WebMvcConfigurationSupport{
 
     @Override
     public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
-        super.configureMessageConverters(converters);
         converters.add(responseBodyConverter());
         converters.add(MappingJacksonHttpMessageConverter());
     }
@@ -50,5 +49,4 @@ public class WebConfig extends WebMvcConfigurationSupport{
         configurer.favorPathExtension(false);
     }
 
-}
-
+}

+ 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);
 }

+ 2 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/ProdInOutService.java

@@ -74,6 +74,7 @@ public interface ProdInOutService extends CommonBaseService<ProdInOutMapper, Pro
 
     void batchOpen(BatchDealBaseDTO baseDTOs);
 
-    void updateYqty(ProdInOut prodInOut);
+
+    void calcProdInout(Long pi_id, String pi_class);
 
 }

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

@@ -350,11 +350,11 @@ 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);
         }
     }
 
@@ -401,7 +401,6 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         targetPi.setPi_pucode(sourcePi.getPi_pucode());
         //设置公司id
         targetPi.setCompanyId(sourcePi.getCompanyId());
-        targetPi.setCreatorId(sourcePi.getCreatorId());
         targetPi.setCreateTime(new Date());
 
 
@@ -409,7 +408,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         getMapper().insertSelective(targetPi);
         //插入验退单从表
         long pi_id = targetPi.getId();
-        for (int i = 1;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();
@@ -419,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());
@@ -442,7 +441,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
          }
 
         //采购验退单相关计算
-        updateYqty(targetPi);
+        calcProdInout(pi_id,"采购验退单");
         DocBaseDTO baseDTO = new DocBaseDTO();
         baseDTO.setId(pi_id);
         baseDTO.setCode(piInoutno);

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

@@ -413,7 +413,6 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         prodInOut.setPi_puid(purchase.getId().intValue());
         prodInOut.setPi_pucode(purchase.getPu_code());
         prodInOut.setCompanyId(purchase.getCompanyId());
-        prodInOut.setCreatorId(purchase.getCreatorId());
         prodInOut.setCreateTime(new Date());
 
 
@@ -425,7 +424,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         //插入验收单从表
         long pi_id = prodInOut.getId();
 
-        for (int i=1;i<=purchaseDetails.size();i++){
+        for (int i=0;i<purchaseDetails.size();i++){
             PurchaseDetail purchaseDetail =purchaseDetails.get(i);
             ProdIODetail prodIODetail = new ProdIODetail();
             pdQty = purchaseDetail.getPd_qty()==null?0:purchaseDetail.getPd_qty();
@@ -435,7 +434,7 @@ 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());
@@ -456,7 +455,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             }
         }
         //采购单相关计算
-        prodInOutService.updateYqty(prodInOut);
+        prodInOutService.calcProdInout(pi_id,"采购验收单");
         DocBaseDTO baseDTO = new DocBaseDTO();
         baseDTO.setId(pi_id);
         baseDTO.setCode(piInoutno);

+ 3 - 4
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/config/WebConfig.java

@@ -8,7 +8,7 @@ import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.http.converter.StringHttpMessageConverter;
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
 import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 import java.nio.charset.Charset;
 import java.text.SimpleDateFormat;
@@ -20,8 +20,9 @@ import java.util.List;
  * @create: 2018-10-30 11:20
  **/
 
+
 @Configuration
-public class WebConfig extends WebMvcConfigurationSupport{
+public class WebConfig implements WebMvcConfigurer {
     @Bean
     public HttpMessageConverter<String> responseBodyConverter() {
         StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
@@ -40,7 +41,6 @@ public class WebConfig extends WebMvcConfigurationSupport{
 
     @Override
     public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
-        super.configureMessageConverters(converters);
         converters.add(responseBodyConverter());
         converters.add(MappingJacksonHttpMessageConverter());
     }
@@ -49,6 +49,5 @@ public class WebConfig extends WebMvcConfigurationSupport{
     public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
         configurer.favorPathExtension(false);
     }
-
 }
 

+ 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/sale/Saledetail.js

@@ -5,8 +5,8 @@ Ext.define('saas.model.sale.Saledetail', {
         { name: 'sd_detno', type: 'int' },
         { name: 'id', type: 'int' },
         { name: 'sd_prodcode', type: 'string' },
-        { name: 'sd_qty', type: 'int' },
-        { name: 'sd_yqty', type: 'int' },
+        { name: 'sd_qty', type: 'float' },
+        { name: 'sd_yqty', type: 'float' },
         { name: 'sd_price', type: 'float' },
         { name: 'sd_taxrate', type: 'float' },
         { name: 'sd_total', type: 'float' },

+ 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'}]        
 });

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

@@ -137,7 +137,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/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);
     },
 

+ 32 - 17
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: '仓库状态码',
@@ -172,12 +185,14 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 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: '单据规则',

+ 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", 

+ 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

+ 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',

+ 31 - 15
frontend/saas-web/app/view/money/othspendings/QueryPanelController.js

@@ -6,26 +6,42 @@ Ext.define('saas.view.money.othspendings.QueryPanelController', {
         this.control({
             //放大镜赋值关系 以及 tpl模板
             'dbfindtrigger[name=os_vendname]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dataUrl:'/api/document/vendor/list',
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dataUrl: '/api/document/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
-                        dbfinds:[{
-                            from:'id',to:'os_vendid'
-                        },{
-                            from:'ve_code',to:'os_vendcode'
-                        },{
-                            from:'ve_name',to:'os_vendname'
+                        dbfinds: [{
+                            from: 'id',
+                            to: 'os_vendid'
+                        }, {
+                            from: 've_code',
+                            to: 'os_vendcode'
+                        }, {
+                            from: 've_name',
+                            to: 'os_vendname'
                         }],
-                        dbtpls:[{
-                            field:'ve_code',width:100
-                        },{
-                            field:'ve_name',width:100
+                        dbtpls: [{
+                            field: 've_code',
+                            width: 100
+                        }, {
+                            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"
@@ -71,7 +87,7 @@ Ext.define('saas.view.money.othspendings.QueryPanelController', {
                             "dataIndex": "ve_bankcode",
                             "width": 100
                         }]
-                    }) ;   
+                    });
 
                 }
             },

+ 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'
             }

+ 49 - 66
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -7,102 +7,85 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
         this.control({
             // 供应商名称
             'dbfindtrigger[name=pb_vendname]':{
-                beforerender:function(f){
-                    Ext.apply(f,{
-                        dataUrl:'/api/document/vendor/list',
+                beforerender: function (f) {
+                    Ext.apply(f, {
+                        dataUrl: '/api/document/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
-                        defaultCondition:"ve_statuscode='OPEN'",
-                        //赋值 
-                        dbfinds:[{
-                            from:'ve_code',to:'pd_vendcode'
-                        },{
-                            from:'ve_name',to:'pb_vendname'
+                        dbfinds: [{
+                            from: 've_code',
+                            to: 'pd_vendcode'
+                        }, {
+                            from: 've_name',
+                            to: 'pb_vendname'
                         }],
-                        //联想设置
-                        dbtpls:[{
-                            field:'ve_code',width:100
-                        },{
-                            field:'ve_name',width:100
+                        dbtpls: [{
+                            field: 've_code',
+                            width: 100
+                        }, {
+                            field: 've_name',
+                            width: 100
                         }],
-                        //联想查询条件
-                        dbtplfield:"ve_name",
-                        //放大镜窗口字段
-                        dbSearchFields: [{
-                            emptyText: '输入供应商编号或名称',
-                            xtype: "textfield",
-                            name: "search",
-                            getCondition: function (v) {
+                        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
+                            allowBlank : true, 
+                            columnWidth : 0.25
                         }],
-                        //放大镜窗口列表
                         dbColumns:[{
                             "text": "供应商ID",
-                            "flex": 0,
-                            "dataIndex": "ve_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
-                            "width": 50,
-                            "xtype": "",
+                            "width": 200,
                             "items": null
-                        },{
+                        }, {
                             "text": "税率",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "ve_taxrate",
-                            "width": 50,
-                            "xtype": "",
-                            "items": null
-                        },{
+                            "width": 100
+                        }, {
                             "text": "承付天数",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "ve_promisedays",
-                            "width": 50,
-                            "xtype": "",
-                            "items": null
-                        },{
+                            "width": 100
+                        }, {
                             "text": "纳税人识别号",
-                            "flex": 0,
-                            "dataIndex": "ve_nsrzh",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        },{
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
                             "text": "开户银行",
-                            "flex": 0,
-                            "dataIndex": "ve_bankcode",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "银行账户",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "ve_bankaccount",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
-                    }) ;   
+                    });
 
                 }
             },

+ 42 - 15
frontend/saas-web/app/view/money/payBalance/QueryPanelController.js

@@ -22,37 +22,64 @@ 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,
-                            "dataIndex": "ve_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
-                            "xtype": "",
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 

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

@@ -119,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: "结算方式",
@@ -137,6 +151,7 @@ Ext.define('saas.view.money.recBalance.FormPanel', {
         }, {
             text: "备注",
             dataIndex: "rd_remark",
+            width: 250,
             editor: {
                 xtype: 'textfield'
             }
@@ -185,26 +200,82 @@ 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'
+            // 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_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: '备注',

+ 55 - 31
frontend/saas-web/app/view/money/recBalance/FormPanelController.js

@@ -27,37 +27,49 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                             field:'cu_name',width:100
                         }],
                         defaultCondition: 'cu_statuscode="OPEN"',
-                        //放大镜窗口字段
                         dbSearchFields:[{
                             emptyText:'输入客户编号或名称',
-                            name : "cu_name", 
+                            xtype : "textfield", 
+                            name : "search", 
                             getCondition: function(v) {
                                 return "(upper(cu_code) like '%"+v.toUpperCase()+"%' or upper(cu_name) like '%"+v.toUpperCase()+"%')";
                             },
-                            fieldLabel : "客户名称", 
+                            allowBlank : true, 
                             columnWidth : 0.25
                         }],
                         //放大镜窗口列表
                         dbColumns:[{
-                            "text": "ID",
-                            "flex": 0,
+                            "text": "客户ID",
+                            "hidden": true,
                             "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
                         },{
-                            "text": "供应商编号",
-                            "flex": 1,
+                            "text": "客户编号",
                             "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
-                            "text": "供应商名称",
-                            "flex": 1,
+                            "text": "客户名称",
+                            "dataIndex": "cu_name",
+                            "width": 200
+                        },{
+                            "text": "客户类型",
                             "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
+                        },{
+                            "text": "业务员",
+                            "dataIndex": "cu_sellername",
+                            "width": 100
+                        },{
+                            "text": "税率",
+                            "dataIndex": "cu_taxrate",
+                            "width": 100
+                        },{
+                            "text": "承付天数",
+                            "dataIndex": "cu_promisedays",
+                            "width": 100
+                        },{
+                            "text": "额度",
+                            "dataIndex": "cu_credit",
+                            "width": 100
                         }]
                     }) ;   
 
@@ -98,25 +110,37 @@ Ext.define('saas.view.money.recBalance.FormPanelController', {
                         }],
                         //放大镜窗口列表
                         dbColumns:[{
-                            "text": "ID",
-                            "flex": 0,
+                            "text": "客户ID",
+                            "hidden": true,
                             "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
                         },{
-                            "text": "供应商编号",
-                            "flex": 1,
+                            "text": "客户编号",
                             "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
-                            "text": "供应商名称",
-                            "flex": 1,
+                            "text": "客户名称",
+                            "dataIndex": "cu_name",
+                            "width": 200
+                        },{
+                            "text": "客户类型",
                             "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
+                        },{
+                            "text": "业务员",
+                            "dataIndex": "cu_sellername",
+                            "width": 100
+                        },{
+                            "text": "税率",
+                            "dataIndex": "cu_taxrate",
+                            "width": 100
+                        },{
+                            "text": "承付天数",
+                            "dataIndex": "cu_promisedays",
+                            "width": 100
+                        },{
+                            "text": "额度",
+                            "dataIndex": "cu_credit",
+                            "width": 100
                         }]
                     }) ;   
 

+ 42 - 15
frontend/saas-web/app/view/money/recBalance/QueryPanelController.js

@@ -22,37 +22,64 @@ 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,
-                            "dataIndex": "ve_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
-                            "xtype": "",
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 

+ 95 - 30
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,125 @@ 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,
+                    minValue:0
                 },
-                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", 
@@ -207,7 +272,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
                 width : 120.0, 
                 editor : {
                     xtype : "datefield",
-                    editable : true, 
+                    editable : false, 
                     hideTrigger : false
                 }
             },

+ 31 - 16
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,7 +27,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
-                        //放大镜窗口字段
+                        defaultCondition: "ve_statuscode='OPEN'",
                         dbSearchFields:[{
                             emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
@@ -40,37 +42,50 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         dbColumns:[{
                             "text": "供应商ID",
                             "hidden": true,
-                            "dataIndex": "ve_id",
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
                             "text": "供应商编号",
+                            "flex": 1,
                             "dataIndex": "ve_code",
+                            "width": 100
                         }, {
                             "text": "供应商名称",
+                            "flex": 1,
                             "dataIndex": "ve_name",
+                            "width": 100
                         }, {
                             "text": "供应商类型",
+                            "flex": 0,
                             "dataIndex": "ve_type",
-                        },{
+                            "width": 200,
+                            "items": null
+                        }, {
                             "text": "税率",
+                            "flex": 1,
                             "dataIndex": "ve_taxrate",
-                            "width": 80,
-                            "xtype": "",
-                            "items": null
-                        },{
+                            "width": 100
+                        }, {
                             "text": "承付天数",
+                            "flex": 1,
                             "dataIndex": "ve_promisedays",
-                            "width": 80,
-                            "xtype": "",
-                            "items": null
-                        },{
+                            "width": 100
+                        }, {
                             "text": "纳税人识别号",
-                            "dataIndex": "ve_nsrzh",
-                        },{
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
                             "text": "开户银行",
-                            "dataIndex": "ve_bankcode",
-                        },{
-                            "text": "银行账户",
+                            "flex": 1,
                             "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 

+ 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',

+ 42 - 15
frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js

@@ -22,37 +22,64 @@ 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,
-                            "dataIndex": "ve_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
-                            "xtype": "",
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 

+ 80 - 53
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", 
@@ -191,36 +215,6 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 dataIndex : "pd_whcode",
                 hidden:true
             },
-            // {
-            //     text : "仓库", 
-            //     dataIndex : "pd_whname", 
-            //     width : 120.0, 
-            //     items : null,
-            //     editor : {
-            //         editable:false,
-            //         xtype : "remotecombo", 
-            //         storeUrl:'/api/document/warehouse/getCombo',
-            //         name : "wh_name", 
-            //         hiddenBtn:false,//true 则会关闭新增按钮功能
-            //         addHandler:function(b){
-            //             var document = Ext.create('saas.view.document.kind.Kind',{});
-            //             var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;
-            //             this.dialog = form.getController().getView().add({
-            //                 xtype: 'document-kind-childwin',
-            //                 bind: {
-            //                     title: '新增供应商类型'
-            //                 },
-            //                 dataKind:'warehouse',
-            //                 belong:document.etc['warehouse'],
-            //                 _parent:form,
-            //                 _combo:this.ownerCmp,
-            //                 record:null,
-            //                 session: true
-            //             });
-            //             this.dialog.show();
-            //         }
-            //     }
-            // },
             {
                 text : "仓库", 
                 dataIndex : "pd_whname", 
@@ -243,8 +237,10 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
             {
                 text : "单价",
                 editor : {
-                    xtype : "numberfield"
-                }, 
+                    xtype : "numberfield",
+                    decimalPrecision: 8,
+                    minValue:0
+                },
                 dataIndex : "pd_orderprice", 
                 width : 120.0, 
                 xtype : "numbercolumn"
@@ -253,22 +249,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 +312,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;
                 }

+ 38 - 22
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js

@@ -22,7 +22,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         addTitle: '供应商资料',
                         defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'ve_id',to:'pi_vendid'
+                            from:'id',to:'pi_vendid'
                         },{
                             from:'ve_code',to:'pi_vendcode'
                         },{
@@ -33,48 +33,64 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
-                        //放大镜窗口字段
+                        defaultCondition: "ve_statuscode='OPEN'",
                         dbSearchFields:[{
                             emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
-                            name : "ve_name", 
-                            allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
+                            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,
-                            "dataIndex": "ve_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
-                            "xtype": "",
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 

+ 42 - 15
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js

@@ -22,37 +22,64 @@ 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,
-                            "dataIndex": "ve_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
-                            "xtype": "",
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 

+ 5 - 2
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", 
@@ -204,7 +205,9 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
             {
                 text : "单价",
                 editor : {
-                    xtype : "numberfield"
+                    xtype : "numberfield",
+                    decimalPrecision: 8,
+                    minValue:0
                 },  
                 dataIndex : "pd_orderprice", 
                 width : 120.0, 

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

@@ -32,48 +32,64 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
-                        //放大镜窗口字段
+                        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 "(upper(ve_name) like '%"+v.toUpperCase()+"%' or upper(ve_code) like '%"+v.toUpperCase()+"%')";
-                            }
+                            columnWidth : 0.25
                         }],
                         dbColumns:[{
-                            conditionCode:'ve_id',
                             "text": "供应商ID",
-                            "flex": 0,
-                            "dataIndex": "ve_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
-                            "xtype": "",
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 

+ 42 - 15
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js

@@ -22,37 +22,64 @@ 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,
-                            "dataIndex": "ve_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
-                            "xtype": "",
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 

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

@@ -113,53 +113,113 @@ 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'
+                hidden : true,
+                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 +238,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"
                 },
             }
         ]

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

@@ -90,11 +90,11 @@ Ext.define('saas.view.sale.sale.QueryPanel', {
         }, {
             text: '客户编号',
             dataIndex: 'sa_custcode',
-            width: 120
+            width: 150
         }, {
             text: '客户名称',
             dataIndex: 'sa_custname',
-            width: 120
+            width: 180
         }, {
             text: '审核状态',
             dataIndex: 'sa_status',

+ 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;
                 }

+ 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;
                 }

+ 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", 

+ 46 - 49
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,48 +31,64 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
-                        //放大镜窗口字段
+                        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 "upper(ve_name) like '%"+v.toUpperCase()+"%' or upper(ve_code) like '%"+v.toUpperCase()+"%'";
-                            }
+                            columnWidth : 0.25
                         }],
                         dbColumns:[{
-                            conditionCode:'id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
-                            "xtype": "",
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 
@@ -95,9 +110,9 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             from:'cu_name',to:'pi_custname'
                         }],
                         dbtpls:[{
-                            field:'pi_custcode',width:100
+                            field:'cu_code',width:100
                         },{
-                            field:'pi_custname',width:100
+                            field:'cu_name',width:100
                         }],
                         defaultCondition:"cu_statuscode='OPEN'",
                         //放大镜窗口字段
@@ -113,54 +128,36 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         }],
                         dbColumns:[{
                             "text": "客户ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "客户编号",
-                            "flex": 1,
                             "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "客户名称",
-                            "flex": 1,
                             "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 200
                         },{
                             "text": "客户类型",
-                            "flex": 1,
                             "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         },{
                             "text": "业务员",
-                            "flex": 1,
                             "dataIndex": "cu_sellername",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         },{
                             "text": "税率",
-                            "flex": 1,
                             "dataIndex": "cu_taxrate",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         },{
                             "text": "承付天数",
-                            "flex": 1,
                             "dataIndex": "cu_promisedays",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         },{
                             "text": "额度",
-                            "flex": 1,
                             "dataIndex": "cu_credit",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }]
                     }) ;   
 

+ 42 - 15
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanelController.js

@@ -22,37 +22,64 @@ 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,
-                            "dataIndex": "ve_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
-                            "xtype": "",
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 

+ 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
             }]
     },{

+ 42 - 15
frontend/saas-web/app/view/stock/make/QueryPanelController.js

@@ -22,37 +22,64 @@ 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,
-                            "dataIndex": "ve_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
-                            "xtype": "",
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 

+ 69 - 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,70 @@ 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,
+                    minValue:0
+                },
+                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);
+                }
             }
         ]
     }, {

+ 44 - 46
frontend/saas-web/app/view/stock/otherIn/FormPanelController.js

@@ -26,48 +26,64 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
-                        //放大镜窗口字段
+                        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 "(upper(ve_name) like '%"+v.toUpperCase()+"%' or upper(ve_code) like '%"+v.toUpperCase()+"%')";
-                            }
+                            columnWidth : 0.25
                         }],
                         dbColumns:[{
-                            conditionCode:'id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
-                            "xtype": "",
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 
@@ -112,54 +128,36 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         }],
                         dbColumns:[{
                             "text": "客户ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "客户编号",
-                            "flex": 1,
                             "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "客户名称",
-                            "flex": 1,
                             "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 200
                         },{
                             "text": "客户类型",
-                            "flex": 1,
                             "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         },{
                             "text": "业务员",
-                            "flex": 1,
                             "dataIndex": "cu_sellername",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         },{
                             "text": "税率",
-                            "flex": 1,
                             "dataIndex": "cu_taxrate",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         },{
                             "text": "承付天数",
-                            "flex": 1,
                             "dataIndex": "cu_promisedays",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         },{
                             "text": "额度",
-                            "flex": 1,
                             "dataIndex": "cu_credit",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }]
                     });
 

+ 42 - 15
frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js

@@ -22,37 +22,64 @@ 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,
-                            "dataIndex": "ve_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
-                            "xtype": "",
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 

+ 75 - 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,75 @@ 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,
+                    minValue:0
+                },
+                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);
+                }
             }
         ]
     }, {

+ 41 - 43
frontend/saas-web/app/view/stock/otherOut/FormPanelController.js

@@ -38,36 +38,52 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             }
                         }],                        
                         dbColumns:[{
-                            conditionCode:'id',
                             "text": "供应商ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
-                            "xtype": "",
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 
@@ -89,9 +105,9 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             from:'cu_name',to:'pi_custname'
                         }],
                         dbtpls:[{
-                            field:'pi_custcode',width:100
+                            field:'cu_code',width:100
                         },{
-                            field:'pi_custname',width:100
+                            field:'cu_name',width:100
                         }],
                         defaultCondition:"pi_statuscode='OPEN'",
                         //放大镜窗口字段
@@ -107,54 +123,36 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         }],
                         dbColumns:[{
                             "text": "客户ID",
-                            "flex": 0,
+                            "hidden": true,
                             "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "客户编号",
-                            "flex": 1,
                             "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "客户名称",
-                            "flex": 1,
                             "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 200
                         },{
                             "text": "客户类型",
-                            "flex": 1,
                             "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         },{
                             "text": "业务员",
-                            "flex": 1,
                             "dataIndex": "cu_sellername",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         },{
                             "text": "税率",
-                            "flex": 1,
                             "dataIndex": "cu_taxrate",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         },{
                             "text": "承付天数",
-                            "flex": 1,
                             "dataIndex": "cu_promisedays",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         },{
                             "text": "额度",
-                            "flex": 1,
                             "dataIndex": "cu_credit",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }]
                     }) ;   
 
@@ -190,7 +188,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         },{
                             field:'pr_spec',width:100
                         }],
-                        defaultCondition: "pr_statuscode='OPEN'",
+                        defaultCondition:"cu_statuscode='OPEN'",
                         dbSearchFields:[{
                             emptyText:'输入物料编号、名称或规格',
                             xtype : "textfield", 

+ 42 - 15
frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js

@@ -22,37 +22,64 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                         },{
                             field:'ve_name',width:100
                         }],
+                        defaultCondition:"ve_statuscode='OPEN'",
+                        dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
+                            xtype : "textfield", 
+                            name : "ve_name", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "(upper(ve_name) like '%"+v.toUpperCase()+"%' or upper(ve_code) like '%"+v.toUpperCase()+"%')";
+                            }
+                        }],  
                         dbColumns:[{
-                            conditionCode:'ve_id',
                             "text": "供应商ID",
-                            "flex": 0,
-                            "dataIndex": "ve_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
+                            "dataIndex": "id",
+                            "width": 100,
+                            "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
-                            "xtype": "",
-                            "items": null
+                            "width": 100
                         }, {
-                            conditionCode:'ve_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
-                            "xtype": "",
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 

+ 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: '取消'
+    }
+});