Browse Source

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

guq 7 years ago
parent
commit
4d313de7df
60 changed files with 1340 additions and 1101 deletions
  1. 1 1
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java
  2. 7 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  3. 1 1
      applications/document/document-server/src/main/resources/application.yml
  4. 5 5
      applications/document/document-server/src/main/resources/mapper/ProductMapper.xml
  5. 1 13
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/PurchaseApplication.java
  6. 4 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchasedetailMapper.java
  7. 19 3
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  8. 11 0
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/MakeMaterial.java
  9. 2 3
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/config/WebConfig.java
  10. 1 0
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/MakeMapper.java
  11. 10 1
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/service/impl/MakeServiceImpl.java
  12. 4 0
      applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml
  13. 35 1
      applications/storage/storage-server/src/main/resources/mapper/MakematerialMapper.xml
  14. 7 6
      base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/config/AuthFilter.java
  15. 2 2
      frontend/saas-web/app/model/purchase/prodIODetail.js
  16. 18 8
      frontend/saas-web/app/util/FormUtil.js
  17. 25 1
      frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js
  18. 16 6
      frontend/saas-web/app/view/core/dbfind/DbfindTrigger.js
  19. 25 1
      frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js
  20. 1 0
      frontend/saas-web/app/view/core/form/FormPanel.js
  21. 2 2
      frontend/saas-web/app/view/core/tab/Controller.js
  22. 13 1
      frontend/saas-web/app/view/document/kind/ChildForm.js
  23. 3 4
      frontend/saas-web/app/view/document/kind/Kind.js
  24. 2 1
      frontend/saas-web/app/view/document/kind/KindModel.js
  25. 1 1
      frontend/saas-web/app/view/document/product/FormController.js
  26. 0 21
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  27. 48 19
      frontend/saas-web/app/view/money/payBalance/QueryPanelController.js
  28. 48 19
      frontend/saas-web/app/view/money/recBalance/QueryPanelController.js
  29. 10 5
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  30. 48 19
      frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js
  31. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  32. 6 47
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  33. 48 19
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js
  34. 15 6
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  35. 5 45
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  36. 47 18
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js
  37. 4 2
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  38. 61 68
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  39. 61 68
      frontend/saas-web/app/view/sale/sale/QueryPanelController.js
  40. 4 2
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  41. 61 68
      frontend/saas-web/app/view/sale/saleIn/FormPanelController.js
  42. 61 68
      frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js
  43. 4 2
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  44. 61 68
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  45. 46 53
      frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js
  46. 2 1
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js
  47. 6 46
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js
  48. 48 26
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanelController.js
  49. 5 3
      frontend/saas-web/app/view/stock/make/FormPanel.js
  50. 102 36
      frontend/saas-web/app/view/stock/make/FormPanelController.js
  51. 42 140
      frontend/saas-web/app/view/stock/make/QueryPanel.js
  52. 49 23
      frontend/saas-web/app/view/stock/make/QueryPanelController.js
  53. 1 1
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  54. 7 49
      frontend/saas-web/app/view/stock/otherIn/FormPanelController.js
  55. 49 23
      frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js
  56. 1 1
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  57. 7 49
      frontend/saas-web/app/view/stock/otherOut/FormPanelController.js
  58. 49 23
      frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js
  59. 12 1
      frontend/saas-web/app/view/sys/config/FormPanel.js
  60. 105 0
      frontend/saas-web/overrides/util/Collection.js

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

@@ -98,7 +98,7 @@ public class ProductController {
         return Result.success(map);
     }
 
-    @GetMapping("ReserveCost")
+    @GetMapping("/ReserveCost")
     public Result getReserveCost(PageRequest page, ListReqDTO listReqDTO){
         productService.getReserveCost(page, listReqDTO);
         return Result.success();

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

@@ -30,6 +30,7 @@ import com.usoftchina.saas.page.PageRequest;
 import com.usoftchina.saas.utils.BeanMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 
 import java.util.ArrayList;
@@ -98,6 +99,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     }
 
     @Override
+    @Transactional
     public DocBaseDTO saveFormData(CustomerFormDTO data) {
         if (null == data || null == data.getMain()){
             throw new BizException(500, "数据为空,请填写后再保存");
@@ -223,6 +225,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         singleDelete(id);
     }
 
+    @Transactional
     private void singleDelete(Long id) {
         if (null!=id) {
             DocBaseDTO docBaseDTO = getBaseDTOById(id);
@@ -249,6 +252,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     }
 
     @Override
+    @Transactional
     public void deletecontact(Long id) {
         customercontactMapper.deleteByPrimaryKey(id);
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
@@ -257,6 +261,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     }
 
     @Override
+    @Transactional
     public void deleteaddress(Long id) {
         customeraddressMapper.deleteByPrimaryKey(id);
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
@@ -264,6 +269,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         messageLogService.deleteDetail(docBaseDTO);
     }
 
+    @Transactional
     private DocBaseDTO singleClose(Long id) {
         DocBaseDTO docBaseDTO = null;
         if (null!=id) {
@@ -298,6 +304,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         }
     }
 
+    @Transactional
     private DocBaseDTO singleOpen(Long id) {
         DocBaseDTO docBaseDTO = null;
         if (null!=id) {

+ 1 - 1
applications/document/document-server/src/main/resources/application.yml

@@ -9,7 +9,7 @@ spring:
       password: select111***
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://192.168.253.12:3306/saas_biz?characterEncoding=utf-8&useSSL=false
+    url: jdbc:mysql://192.168.253.12:3306/saas_biz?characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
     username: root
     password: select111***
     hikari:

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

@@ -49,10 +49,10 @@
         <!--productonhand-->
         <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR" />
         <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
-        <result column=" pr_brand" property="pr_brand" jdbcType="VARCHAR" />
-        <result column=" pr_vendname" property="pr_vendname" jdbcType="VARCHAR" />
-        <result column=" pr_zxbzs" property="pr_zxbzs" jdbcType="VARCHAR" />
-        <result column=" pr_leadtime" property="pr_leadtime" jdbcType="INTEGER" />
+        <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR" />
+        <result column="pr_vendname" property="pr_vendname" jdbcType="VARCHAR" />
+        <result column="pr_zxbzs" property="pr_zxbzs" jdbcType="VARCHAR" />
+        <result column="pr_leadtime" property="pr_leadtime" jdbcType="INTEGER" />
         <result column="pr_status" property="pr_status" jdbcType="VARCHAR" />
         <result column="pr_statuscode" property="pr_statuscode" jdbcType="VARCHAR" />
     </resultMap>
@@ -475,7 +475,7 @@
         <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" />
+        <result column="pw_amount" property="rc_amount" jdbcType="DOUBLE" />
     </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

+ 1 - 13
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/PurchaseApplication.java

@@ -8,8 +8,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
-import org.springframework.web.servlet.config.annotation.CorsRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 
 /**
  * @author yingp
@@ -21,19 +19,9 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
 @EnableFeignClients("com.usoftchina.saas")
 @EnableAuthClient
 @MapperScan("com.usoftchina.saas.purchase.mapper")
-public class PurchaseApplication   extends WebMvcConfigurerAdapter{
+public class PurchaseApplication {
     public static void main(String[] args) {
         SpringApplication.run(PurchaseApplication.class, args);
     }
 
-    @Override
-    public void addCorsMappings(CorsRegistry registry) {
-
-        registry.addMapping("/**")
-                .allowCredentials(true)
-                .allowedHeaders("*")
-                .allowedOrigins("*")
-                .allowedMethods("*");
-    }
-
 }

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

@@ -27,4 +27,8 @@ public interface PurchasedetailMapper extends CommonBaseMapper<Purchase> {
 
 
     void calcPurchase(Long pu_id);
+
+//    void getVendorTaxrate(Long pu_id);
+//
+//    void getPrice(Long pu_id);
 }

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

@@ -13,6 +13,7 @@ import com.usoftchina.saas.commons.exception.BizExceptionCode;
 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.api.ProductApi;
 import com.usoftchina.saas.exception.BizException;
 import com.usoftchina.saas.exception.ExceptionCode;
 import com.usoftchina.saas.page.PageRequest;
@@ -47,8 +48,8 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     private PurchasedetailMapper purchasedetailMapper;
     @Autowired
     private PurchaseListMapper purchaseListMapper;
-   /* @Autowired
-    private ProductApi productApi;*/
+    @Autowired
+    private ProductApi productApi;
     @Autowired
     private MaxnumberService maxnumberService;
     @Autowired
@@ -179,6 +180,12 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         }
         baseDTO = getBaseDTOById(pu_id);
 
+        //取供应商汇率
+        getVendorTaxrate(pu_id);
+        //取价
+        getPrice(pu_id);
+
+
         //计算金额,未税单价,未税金额等
         calcPurchase(pu_id);
         //日志
@@ -186,6 +193,15 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         return baseDTO;
     }
 
+    private void getVendorTaxrate(Long pu_id) {
+//        purchasedetailMapper.getVendorTaxrate(pu_id);
+    }
+
+    private void getPrice(Long pu_id) {
+//        purchasedetailMapper.getPrice(pu_id);
+    }
+
+
     @Override
     @Transactional
     public void delete(Long id) {
@@ -474,7 +490,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         //更新存在字段
         purchaseMapper.updateByPrimaryKeySelective(purchase);
         //更新最新采购单价
-        //productApi.updateLatestPurchasePrice(id);
+        productApi.updateLatestPurchasePrice(id);
         DocBaseDTO docBaseDTO = getBaseDTOById(id);
         //日志
         messageLogService.audit(docBaseDTO);

+ 11 - 0
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/MakeMaterial.java

@@ -1,6 +1,7 @@
 package com.usoftchina.saas.storage.po;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import com.usoftchina.saas.document.entities.Product;
 
 import java.io.Serializable;
 import java.util.Date;
@@ -35,6 +36,16 @@ public class MakeMaterial extends CommonBaseEntity implements Serializable {
 
     private String mm_remark;
 
+    private Product product;
+
+    public Product getProduct() {
+        return product;
+    }
+
+    public void setProduct(Product product) {
+        this.product = product;
+    }
+
     public Long getMm_maid() {
         return mm_maid;
     }

+ 2 - 3
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/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());
     }

+ 1 - 0
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/mapper/MakeMapper.java

@@ -25,4 +25,5 @@ public interface MakeMapper extends CommonBaseMapper<Make> {
 
     int validateCodeWhenUpdate(@Param("code") String code, @Param("id") Long id, @Param("companyId") Long company);
 
+    double getOnHand(@Param("prodcode") String prodcode, @Param("whcode") String whcode, @Param("companyId") Long companyId);
 }

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

@@ -140,12 +140,21 @@ public class MakeServiceImpl extends CommonBaseServiceImpl<MakeMapper, Make> imp
         List<MakeMaterial> makeMaterialList = makeListDTO.getItems();
         if ("组装".equals(make.getMa_type())){
             //判断明细的库存是否足够
+            int i = 0;
             for(MakeMaterial makeMaterial : makeMaterialList){
+                i++;
                 double qty = makeMaterial.getMm_qty() * makeMaterial.getMm_oneuseqty();
+                double onHand = getMapper().getOnHand(makeMaterial.getMm_prodcode(),makeMaterial.getMm_whcode(), BaseContextHolder.getCompanyId());
+                if(onHand < qty){
+                    throw new BizException(79402, "行" + i + "库存不足");
+                }
             }
         }else if ("拆件".equals(make.getMa_type())){
             double qty = make.getMa_qty();
-
+            double onHand = getMapper().getOnHand(make.getMa_prodcode(),make.getMa_whcode(),BaseContextHolder.getCompanyId());
+            if(onHand < qty){
+                throw new BizException(79402, make.getMa_prodcode() + ":库存不足");
+            }
         }
     }
 

+ 4 - 0
applications/storage/storage-server/src/main/resources/mapper/MakeMapper.xml

@@ -367,4 +367,8 @@
   <select id="validateCodeWhenUpdate" resultType="int" >
     select count(*) from MAKE where MA_CODE = #{code} and MA_ID != #{id} and companyId =#{companyId}
   </select>
+
+    <select id="getOnHand" resultType="double">
+        SELECT PW_ONHAND FROM PRODUCTWH WHERE PW_PRODCODE=#{prodcode} AND PW_WHCODE=#{whcode} and COMPANYID=#{companyId}
+    </select>
 </mapper>

+ 35 - 1
applications/storage/storage-server/src/main/resources/mapper/MakematerialMapper.xml

@@ -18,6 +18,40 @@
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
     <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <association property="product" jdbcType="com.usoftchina.saas.document.entities.Product">
+        <id column="pr_id" property="id" jdbcType="INTEGER" />
+        <result column="pr_code" property="pr_code" jdbcType="VARCHAR" />
+        <result column="pr_detail" property="pr_detail" jdbcType="VARCHAR" />
+        <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR" />
+        <result column="pr_unit" property="pr_unit" jdbcType="VARCHAR" />
+        <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR" />
+        <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
+        <result column="pr_whid" property="pr_whid" jdbcType="INTEGER" />
+        <result column="pr_whcode" property="pr_whcode" jdbcType="VARCHAR" />
+        <result column="pr_whname" property="pr_whname" jdbcType="VARCHAR" />
+        <result column="pr_zxbzs" property="pr_zxbzs" jdbcType="INTEGER" />
+        <result column="pr_leadtime" property="pr_leadtime" jdbcType="INTEGER" />
+        <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR" />
+        <result column="pr_standardprice" property="pr_standardprice" jdbcType="DOUBLE" />
+        <result column="pr_purcprice" property="pr_purcprice" jdbcType="DOUBLE" />
+        <result column="pr_saleprice" property="pr_saleprice" jdbcType="DOUBLE" />
+        <result column="pr_vendid" property="pr_vendid" jdbcType="INTEGER" />
+        <result column="pr_vendcode" property="pr_vendcode" jdbcType="VARCHAR" />
+        <result column="pr_vendname" property="pr_vendname" jdbcType="VARCHAR" />
+        <result column="pr_docdate" property="pr_docdate" jdbcType="TIMESTAMP" />
+        <result column="pr_recordmanid" property="pr_recordmanid" jdbcType="INTEGER" />
+        <result column="pr_recordman" property="pr_recordman" jdbcType="VARCHAR" />
+        <result column="pr_status" property="pr_status" jdbcType="VARCHAR" />
+        <result column="pr_statuscode" property="pr_statuscode" jdbcType="VARCHAR" />
+        <result column="companyId" property="companyId" jdbcType="INTEGER" />
+        <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+        <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+        <result column="pr_text1" property="pr_text1" jdbcType="VARCHAR" />
+        <result column="pr_text2" property="pr_text2" jdbcType="VARCHAR" />
+        <result column="pr_text3" property="pr_text3" jdbcType="VARCHAR" />
+        <result column="pr_text4" property="pr_text4" jdbcType="VARCHAR" />
+        <result column="pr_text5" property="pr_text5" jdbcType="VARCHAR" />
+    </association>
   </resultMap>
   <sql id="Base_Column_List" >
     mm_id, mm_maid, mm_detno, mm_prodid, mm_prodcode, mm_whid, mm_whcode, mm_price, mm_oneuseqty, 
@@ -215,7 +249,7 @@
     where mm_id = #{id}
   </update>
   <select id="selectByFK" resultMap="BaseResultMap">
-    SELECT * FROM MAKEMATERIAL WHERE MM_MAID=#{id} AND COMPANYID={companyId}
+    SELECT * FROM MAKEMATERIAL LEFT JOIN PRODUCT ON PR_ID=MA_PRODID AND MAKEMATERIAL.COMPANYID=PRODUCT.COMPANYID WHERE MM_MAID=#{id} AND MAKEMATERIAL.COMPANYID={companyId}
   </select>
   <delete id="deleteByFK">
     DELETE FROM MAKEMATERIAL WHERE MM_MAID=#{id} AND COMPANYID={companyId}

+ 7 - 6
base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/config/AuthFilter.java

@@ -23,7 +23,7 @@ import reactor.core.publisher.Mono;
 
 import java.util.List;
 import java.util.Set;
-import java.util.stream.Stream;
+import java.util.stream.Collectors;
 
 /**
  * 全局过滤器鉴权
@@ -66,19 +66,20 @@ public class AuthFilter implements GlobalFilter, Ordered {
             List<UrlResourceDTO> resources = ResourceCache.of(jwt.getAppId()).getUrlResources();
             if (!CollectionUtils.isEmpty(resources)) {
                 // 本次请求相关的资源
-                Stream<UrlResourceDTO> permissions = resources.parallelStream().filter(resource -> {
+                List<UrlResourceDTO> permissions = resources.parallelStream().filter(resource -> {
                     AntPathRequestMatcher matcher = new AntPathRequestMatcher(resource.getUrl(), resource.getMethod());
                     return matcher.matches(request);
-                });
-                if (permissions.count() > 0) {
+                }).collect(Collectors.toList());
+                if (!CollectionUtils.isEmpty(permissions)) {
                     Set<Long> resourceIds = accountDTO.getResources(jwt.getAppId(), jwt.getCompanyId());
                     boolean permitted = false;
                     if (null != resourceIds) {
                         // 权限匹配
-                        permitted = permissions.anyMatch(resource -> resourceIds.contains(resource.getId()));
+                        permitted = permissions.stream()
+                                .anyMatch(resource -> resourceIds.contains(resource.getId()));
                     }
                     if (!permitted) {
-                        throw new PermissionException(permissions.findFirst().get());
+                        throw new PermissionException(permissions.get(0));
                     }
                 }
             }

+ 2 - 2
frontend/saas-web/app/model/purchase/prodIODetail.js

@@ -13,8 +13,8 @@ Ext.define('saas.model.purchase.ProdIODetail', {
         { name: 'pd_prodid', type: 'int' },
         { name: 'pd_prodcode', type: 'string' },
         { name: 'pd_unit', type: 'string' },
-        { name: 'pd_inqty', type: 'int' },
-        { name: 'pd_outqty', type: 'int' },
+        { name: 'pd_inqty', type: 'float' },
+        { name: 'pd_outqty', type: 'float' },
         { name: 'pd_orderprice', type: 'float' },
         { name: 'pd_sendprice', type: 'float' },
         { name: 'pd_price', type: 'float' },

+ 18 - 8
frontend/saas-web/app/util/FormUtil.js

@@ -36,6 +36,18 @@ Ext.define('saas.util.FormUtil', {
                     });
                     Ext.Array.each(items, function(item) {
 
+                        // 设置必填
+                        if(item.allowBlank==false){
+                            // TODO 需要判断类型
+                            item.beforeLabelTextTpl = "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>";
+                        }
+
+                        if(item.xtype == 'textfield') {
+                            Ext.applyIf(item, {
+                                maxLength: 50
+                            });
+                        }
+                        
                         if(item.xtype == 'datefield') {
                             Ext.applyIf(item, {
                                 format: 'Y-m-d'
@@ -51,12 +63,6 @@ Ext.define('saas.util.FormUtil', {
                             formModel.set(item.name, 0);
                         }
 
-                        // 设置必填
-                        if(item.allowBlank==false){
-                            // TODO 需要判断类型
-                            item.beforeLabelTextTpl = "<font color=\"red\" style=\"position:relative; top:2px;right:2px; font-weight: bolder;\">*</font>";
-                        }
-
                         // 如果是从表为其绑定store
                         if(item.xtype == 'detailGridField') {
                             var index = form.detailCount;
@@ -88,7 +94,11 @@ Ext.define('saas.util.FormUtil', {
                                     c.cls = 'x-grid-necessary';
                                 }
 
-                                if(c.xtype == 'datecolumn') {
+                                if(c.xtype == 'textfield') {
+                                    Ext.applyIf(c, {
+                                        maxLength: 50
+                                    });
+                                }else if(c.xtype == 'datecolumn') {
                                     Ext.applyIf(c, {
                                         format: 'Y-m-d'
                                     });
@@ -221,7 +231,7 @@ Ext.define('saas.util.FormUtil', {
                             var detnoColumn = grid.detnoColumn;
                             var datas = [];
                             
-                            Ext.Array.each(new Array(3), function() {
+                            Ext.Array.each(new Array(10), function() {
                                 detno += 1;
                                 var data = {};
                                 data[detnoColumn] = detno;

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

@@ -55,7 +55,7 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
                 dockedItems:[{
                     xtype:'toolbar',
                     dock:'top',
-                    items:me.dbSearchFields.concat([{
+                    items:me.getSearchFields().concat([{
                         xtype:'button',
                         text:'查询',
                         handler:function(b){
@@ -136,6 +136,30 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
         });
     },
 
+    getSearchFields: function() {
+        var me = this,
+        searchFields = me.dbSearchFields;
+
+        Ext.Array.each(searchFields, function(f) {
+            f.enableKeyEvents = true;
+            f.listeners = {
+                keydown: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        me.condition = '', items = [];
+                        Ext.Array.each(searchFields,function(f) {
+                            var field = th.ownerCt.down('[name='+f.name+']')
+                            items.push(field);
+                        });
+                        me.condition = me.getCondition(items);
+                        me.store.loadPage(1);
+                    }
+                }
+            }
+        });
+
+        return searchFields;
+    },
+
     /**
      * 获得过滤条件
      */

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

@@ -42,7 +42,7 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
                             if(i==0){
                                 span=span+'<span style="width:'+dbtpls[i].width+'px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;float:left;">{'+dbtpls[i].field+'}</span>';//display:block;
                             }else{
-                                span=span+'<span style="width:'+dbtpls[i].width+'px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;float:left;">{'+dbtpls[i].field+'}</span>';
+                                span=span+'<span style="padding:0 0 0 20px;width:'+dbtpls[i].width+'px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;float:left;">{'+dbtpls[i].field+'}</span>';
                             }
                             if(dbtpls[i].dbField=="true"){
                                 me.searchFieldArray=dbtpls[i].field;
@@ -68,11 +68,21 @@ Ext.define('saas.view.core.dbfind.DbfindTrigger', {
                 }
                 //加载数据
                 var data,dbCondition=[];
-                if(me.dbtplcondition){
-                    dbCondition = [{
-                        type: 'condition',
-                        value:me.dbtplcondition,
-                    }];
+                if(me.dbfinds){
+                    var dbtplcondition = "";
+                    for (let index = 0; index < dbfinds.length; index++) {
+                        var item = dbfinds[index].from;
+                        if(!dbfinds[index].ignore){
+                            dbtplcondition+= "upper("+item+") like '%"+queryString.toUpperCase()+"%' or ";
+                        }
+                    }
+                    dbtplcondition = "(" + dbtplcondition.substring(0,dbtplcondition.length-4) + ")";
+                    if(dbtplcondition.length>0){
+                        dbCondition = [{
+                            type: 'condition',
+                            value:dbtplcondition
+                        }];
+                    }
                 }
                 //添加默认条件
                 if(me.defaultCondition) {

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

@@ -82,7 +82,7 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
                 dockedItems:[{
                     xtype:'toolbar',
                     dock:'top',
-                    items:me.dbSearchFields.concat([{
+                    items:me.getSearchFields().concat([{
                         xtype:'button',
                         text:'查询',
                         handler:function(b){
@@ -265,6 +265,30 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
         me.callParent(arguments);
     },
 
+    getSearchFields: function() {
+        var me = this,
+        searchFields = me.dbSearchFields;
+
+        Ext.Array.each(searchFields, function(f) {
+            f.enableKeyEvents = true;
+            f.listeners = {
+                keydown: function(th, e, eOpts) {
+                    if(e.keyCode == 13) {
+                        me.condition = '', items = [];
+                        Ext.Array.each(searchFields,function(f) {
+                            var field = th.ownerCt.down('[name='+f.name+']')
+                            items.push(field);
+                        });
+                        me.condition = me.getCondition(items);
+                        me.store.loadPage(1);
+                    }
+                }
+            }
+        });
+
+        return searchFields;
+    },
+
      /**
      * 获得过滤条件
      */

+ 1 - 0
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -37,6 +37,7 @@ Ext.define('saas.view.core.form.FormPanel', {
     remoteConfig: true, // 是否需要从远端读取form配置
     toolBtns: [], // 自定义按钮
     codeInHeader: true, // 单据编号显示在toolbar
+    closeConfirm: true, // 关闭确认
 
     auditTexts: {
         auditCode: 'AUDITED',

+ 2 - 2
frontend/saas-web/app/view/core/tab/Controller.js

@@ -31,7 +31,7 @@ Ext.define('saas.view.core.tab.Controller', {
          
                 if (me.fireEvent('beforeclose', me) !== false) {
                     if (me.tabBar) {
-                        if(typeof tabView.isDirty == 'function' && tabView.isDirty()) {
+                        if(tabView.closeConfirm && tabView.isDirty()) {
                             showConfirm('提示', '表单数据有修改,确定要退出吗?')
                             .then(function(yes) {
                                 if(yes == 'yes') {
@@ -46,7 +46,7 @@ Ext.define('saas.view.core.tab.Controller', {
                             }
                         }
                     } else {
-                        if(typeof tabView.isDirty == 'function' && tabView.isDirty()) {
+                        if(tabView.closeConfirm == 'function' && tabView.isDirty()) {
                             showConfirm('提示', '表单数据有修改,确定要退出吗?')
                             .then(function(yes) {
                                 if(yes == 'yes') {

+ 13 - 1
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -89,6 +89,18 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 name:'bk_thisamount',
                 allowBlank:false,
                 fieldLabel:'当前金额',
+            },{
+                xtype:'textfield',
+                name:'bk_type',
+                allowBlank:false,
+                fieldLabel:'账户类别',
+            },{
+                xtype:'datefield',
+                name:'bk_date',
+                readOnly:true,
+                fieldLabel:'建账日期',
+                format:'Y-m-d H:i:s',
+                value:new Date()
             }]
         },
         productbrand:{
@@ -274,7 +286,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
         this.BaseUtil.request({
             url: belong.reqUrl,
             params: JSON.stringify(params),
-            method: 'POST',
+            method: 'POST'
         })
         .then(function(localJson) {
             me.setLoading(false);

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

@@ -130,14 +130,13 @@ Ext.define('saas.view.document.kind.Kind', {
                 dataIndex: 'bk_bankname',
                 flex: 1
             },{
-                hidden:true,
                 xtype:'datecolumn',
-                text: '日期',
+                text: '建账日期',
+                format:'Y-m-d H:i:s',
                 dataIndex: 'bk_date',
                 flex: 1
             },{
-                hidden:true,
-                text: '账户类型',
+                text: '账户类别',
                 dataIndex: 'bk_type',
                 flex: 1
             },{

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

@@ -124,7 +124,8 @@ Ext.define('saas.view.document.kind.KindModel', {
                 {name: 'bk_type',  type: 'string'},
                 {name: 'bk_beginamount',  type: 'float'},
                 {name: 'bk_thisamount',  type: 'float'},
-                {name: 'bk_date',  type: 'date'}
+                {name: 'bk_date',  type: 'date'},
+                {name: 'updateTime', type: 'date'}
             ],
             proxy: {
                 type: 'ajax',

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

@@ -86,7 +86,7 @@ Ext.define('saas.view.document.product.FormController', {
                         defaultCondition:"wh_statuscode='OPEN'",
                         //联想设置
                         dbtpls:[{
-                            field:'wh_code',width:100
+                            field:'wh_code',width:180
                         },{
                             field:'wh_description',width:100
                         }],

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

@@ -120,27 +120,6 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                     var format = '0,000.' + xr.join();
                     return Ext.util.Format.number(v, format);
                 }
-            }, {
-                text : "单价", 
-                dataIndex : "sd_price", 
-                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,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",

+ 48 - 19
frontend/saas-web/app/view/money/payBalance/QueryPanelController.js

@@ -120,33 +120,62 @@ Ext.define('saas.view.money.paybalance.QueryPanelController', {
                             "hidden": true,
                             "dataIndex": "id",
                         }, {
-                            "text": "物料编号",
-                            "flex": 1,
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
-                            "text": "物料规格",
-                            "flex": 0,
+                            "text": "规格",
                             "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 100,
                         }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
+                            "text": "单位",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
+                        }]   
                     }) ;   
 
                 }

+ 48 - 19
frontend/saas-web/app/view/money/recBalance/QueryPanelController.js

@@ -120,33 +120,62 @@ Ext.define('saas.view.money.recBalance.QueryPanelController', {
                             "hidden": true,
                             "dataIndex": "id",
                         }, {
-                            "text": "物料编号",
-                            "flex": 1,
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
-                            "text": "物料规格",
-                            "flex": 0,
+                            "text": "规格",
                             "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 100,
                         }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
+                            "text": "单位",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
+                        }]   
                     }) ;   
 
                 }

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

@@ -15,7 +15,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         defaultCondition:"ve_statuscode='OPEN'",
                         //赋值 
                         dbfinds:[{
-                            from:'id',to:'pu_vendid'
+                            from:'id',to:'pu_vendid',ignore:true
                         },{
                             from:'ve_code',to:'pu_vendcode'
                         },{
@@ -142,29 +142,33 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                             "hidden": true,
                             "dataIndex": "id",
                         }, {
-                            "text": "物料编号",
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
+                            "width": 200,
                         }, {
                             "text": "物料名称",
+                            "width": 200,
                             "dataIndex": "pr_detail",
                         }, {
                             "text": "规格",
                             "dataIndex": "pr_spec",
+                            "width": 100,
                         }, {
                             "text": "单位",
                             "dataIndex": "pr_spec",
                             "width": 100,
                         },{
                             "text": "仓库id",
-                            "hidden": true,
                             "dataIndex": "pr_whid",
+                            "hidden": true,
                         },{
                             "text": "仓库编号",
-                            "hidden": true,
                             "dataIndex": "pr_whcode",
+                            "hidden": true,
                         },{
                             "text": "仓库",
                             "dataIndex": "pr_whname",
+                            "width": 200,
                         },{
                             "text": "总库存数",
                             "dataIndex": "po_onhand",
@@ -184,6 +188,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         },{
                             "text": "供应商",
                             "dataIndex": "pr_vendname",
+                            "width": 100,
                         },{
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
@@ -192,7 +197,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                             "text": "L/T",
                             "dataIndex": "pr_leadtime",
                             "width": 100,
-                        }]
+                        }]   
                     }) ;   
 
                 }

+ 48 - 19
frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js

@@ -120,33 +120,62 @@ Ext.define('saas.view.purchase.purchase.QueryPanelController', {
                             "hidden": true,
                             "dataIndex": "id",
                         }, {
-                            "text": "物料编号",
-                            "flex": 1,
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
-                            "text": "物料规格",
-                            "flex": 0,
+                            "text": "规格",
                             "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 100,
                         }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
+                            "text": "单位",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
+                        }]   
                     }) ;   
 
                 }

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

@@ -219,7 +219,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 text : "仓库", 
                 dataIndex : "pd_whname", 
                 width : 120.0, 
-                items : null,
+                allowBlank : false,
                 editor : {
                     displayField : "display", 
                     editable : true, 

+ 6 - 47
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js

@@ -146,102 +146,61 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         }, {
                             "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "width": 100,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "规格",
-                            "flex": 0,
                             "dataIndex": "pr_spec",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "单位",
-                            "flex": 0,
                             "dataIndex": "pr_spec",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "仓库id",
-                            "flex": 0,
                             "dataIndex": "pr_whid",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
                         },{
                             "text": "仓库编号",
-                            "flex": 0,
                             "dataIndex": "pr_whcode",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
                         },{
                             "text": "仓库",
-                            "flex": 0,
                             "dataIndex": "pr_whname",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         },{
                             "text": "总库存数",
-                            "flex": 0,
                             "dataIndex": "po_onhand",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "类型",
-                            "flex": 0,
                             "dataIndex": "pr_kind",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "型号",
-                            "flex": 0,
                             "dataIndex": "pr_orispeccode",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "品牌",
-                            "flex": 0,
                             "dataIndex": "pr_brand",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "供应商",
-                            "flex": 0,
                             "dataIndex": "pr_vendname",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "最小包装",
-                            "flex": 0,
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "L/T",
-                            "flex": 0,
                             "dataIndex": "pr_leadtime",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         }]                    
-                    }) ;   
-
+                    });   
                 }
             },
 

+ 48 - 19
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js

@@ -119,33 +119,62 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanelController', {
                             "hidden": true,
                             "dataIndex": "id",
                         }, {
-                            "text": "物料编号",
-                            "flex": 1,
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
-                            "text": "物料规格",
-                            "flex": 0,
+                            "text": "规格",
                             "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 100,
                         }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
+                            "text": "单位",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
+                        }]   
                     }) ;   
 
                 }

+ 15 - 6
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -157,13 +157,22 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 dataIndex : "pd_outqty", 
                 editor : {
                     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", 
@@ -187,7 +196,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 text : "仓库", 
                 dataIndex : "pd_whname", 
                 width : 120.0, 
-                items : null,
+                allowBlank : false,
                 editor : {
                     displayField : "display", 
                     editable : true, 

+ 5 - 45
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -145,99 +145,59 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         }, {
                             "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "width": 100,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "规格",
-                            "flex": 0,
                             "dataIndex": "pr_spec",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "单位",
-                            "flex": 0,
                             "dataIndex": "pr_spec",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "仓库id",
-                            "flex": 0,
                             "dataIndex": "pr_whid",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
                         },{
                             "text": "仓库编号",
-                            "flex": 0,
                             "dataIndex": "pr_whcode",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
                         },{
                             "text": "仓库",
-                            "flex": 0,
                             "dataIndex": "pr_whname",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         },{
                             "text": "总库存数",
-                            "flex": 0,
                             "dataIndex": "po_onhand",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "类型",
-                            "flex": 0,
                             "dataIndex": "pr_kind",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "型号",
-                            "flex": 0,
                             "dataIndex": "pr_orispeccode",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "品牌",
-                            "flex": 0,
                             "dataIndex": "pr_brand",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "供应商",
-                            "flex": 0,
                             "dataIndex": "pr_vendname",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "最小包装",
-                            "flex": 0,
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "L/T",
-                            "flex": 0,
                             "dataIndex": "pr_leadtime",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         }]
                     }) ;   
 

+ 47 - 18
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js

@@ -119,32 +119,61 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
                             "hidden": true,
                             "dataIndex": "id",
                         }, {
-                            "text": "物料编号",
-                            "flex": 1,
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
-                            "text": "物料规格",
-                            "flex": 0,
+                            "text": "规格",
                             "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 100,
                         }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
+                            "text": "单位",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
                         }]
                     }) ;   
 

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

@@ -114,7 +114,8 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 dataIndex : "sd_qty", 
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 8
+                    decimalPrecision: 8,
+                    minValue:0
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
@@ -158,7 +159,8 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 width : 120.0,
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 8
+                    decimalPrecision: 8,
+                    minValue:0
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');

+ 61 - 68
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -138,74 +138,67 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25
                         }],
-                        dbColumns:[
-                            {
-                                "text": "物料ID",
-                                "hidden": true,
-                                "dataIndex": "id",
-                            },{
-                                "text": "物料编号",
-                                "flex": 1,
-                                "dataIndex": "pr_code",
-                                "width": 100,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "物料名称",
-                                "flex": 1,
-                                "dataIndex": "pr_detail",
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "规格",
-                                "flex": 1,
-                                "dataIndex": "pr_spec",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "单位",
-                                "flex": 1,
-                                "dataIndex": "pr_unit",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "品牌",
-                                "flex": 1,
-                                "dataIndex": "pr_brand",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商ID",
-                                "flex": 0,
-                                "dataIndex": "pr_vendid",
-                                "width": 0,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商编号",
-                                "flex": 1,
-                                "dataIndex": "pr_vendcode",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商名称",
-                                "flex": 1,
-                                "dataIndex": "pr_vendname",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "最小包装量",
-                                "flex": 1,
-                                "dataIndex": "pr_zxbzs",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }]
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
+                            "text": "物料编号",       
+                            "dataIndex": "pr_code",
+                            "width": 200,
+                        }, {
+                            "text": "物料名称",
+                            "width": 200,
+                            "dataIndex": "pr_detail",
+                        }, {
+                            "text": "规格",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        }, {
+                            "text": "单位",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
+                            "width": 200,
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
+                        }]
                     }) ;   
 
                 }

+ 61 - 68
frontend/saas-web/app/view/sale/sale/QueryPanelController.js

@@ -88,74 +88,67 @@ Ext.define('saas.view.sale.sale.QueryPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25
                         }],
-                        dbColumns:[
-                            {
-                                "text": "物料ID",
-                                "hidden": true,
-                                "dataIndex": "id",
-                            },{
-                                "text": "物料编号",
-                                "flex": 1,
-                                "dataIndex": "pr_code",
-                                "width": 100,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "物料名称",
-                                "flex": 1,
-                                "dataIndex": "pr_detail",
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "规格",
-                                "flex": 1,
-                                "dataIndex": "pr_spec",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "单位",
-                                "flex": 1,
-                                "dataIndex": "pr_unit",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "品牌",
-                                "flex": 1,
-                                "dataIndex": "pr_brand",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商ID",
-                                "flex": 0,
-                                "dataIndex": "pr_vendid",
-                                "width": 0,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商编号",
-                                "flex": 1,
-                                "dataIndex": "pr_vendcode",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商名称",
-                                "flex": 1,
-                                "dataIndex": "pr_vendname",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "最小包装量",
-                                "flex": 1,
-                                "dataIndex": "pr_zxbzs",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }]
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
+                            "text": "物料编号",       
+                            "dataIndex": "pr_code",
+                            "width": 200,
+                        }, {
+                            "text": "物料名称",
+                            "width": 200,
+                            "dataIndex": "pr_detail",
+                        }, {
+                            "text": "规格",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        }, {
+                            "text": "单位",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
+                            "width": 200,
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
+                        }]
                     }) ;   
 
                 }

+ 4 - 2
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -111,7 +111,8 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 width : 120.0,
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 8
+                    decimalPrecision: 8,
+                    minValue:0
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
@@ -159,7 +160,8 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 width : 120.0, 
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 8
+                    decimalPrecision: 8,
+                    minValue:0
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');

+ 61 - 68
frontend/saas-web/app/view/sale/saleIn/FormPanelController.js

@@ -138,74 +138,67 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25
                         }],
-                        dbColumns:[
-                            {
-                                "text": "物料ID",
-                                "hidden": true,
-                                "dataIndex": "id",
-                            },{
-                                "text": "物料编号",
-                                "flex": 1,
-                                "dataIndex": "pr_code",
-                                "width": 100,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "物料名称",
-                                "flex": 1,
-                                "dataIndex": "pr_detail",
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "规格",
-                                "flex": 1,
-                                "dataIndex": "pr_spec",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "单位",
-                                "flex": 1,
-                                "dataIndex": "pr_unit",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "品牌",
-                                "flex": 1,
-                                "dataIndex": "pr_brand",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商ID",
-                                "flex": 0,
-                                "dataIndex": "pr_vendid",
-                                "width": 0,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商编号",
-                                "flex": 1,
-                                "dataIndex": "pr_vendcode",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商名称",
-                                "flex": 1,
-                                "dataIndex": "pr_vendname",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "最小包装量",
-                                "flex": 1,
-                                "dataIndex": "pr_zxbzs",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }]
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
+                            "text": "物料编号",       
+                            "dataIndex": "pr_code",
+                            "width": 200,
+                        }, {
+                            "text": "物料名称",
+                            "width": 200,
+                            "dataIndex": "pr_detail",
+                        }, {
+                            "text": "规格",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        }, {
+                            "text": "单位",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
+                            "width": 200,
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
+                        }]
                     }) ;   
 
                 }

+ 61 - 68
frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js

@@ -93,74 +93,67 @@ Ext.define('saas.view.sale.saleIn.QueryPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25
                         }],
-                        dbColumns:[
-                            {
-                                "text": "物料ID",
-                                "hidden": true,
-                                "dataIndex": "id",
-                            },{
-                                "text": "物料编号",
-                                "flex": 1,
-                                "dataIndex": "pr_code",
-                                "width": 100,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "物料名称",
-                                "flex": 1,
-                                "dataIndex": "pr_detail",
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "规格",
-                                "flex": 1,
-                                "dataIndex": "pr_spec",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "单位",
-                                "flex": 1,
-                                "dataIndex": "pr_unit",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "品牌",
-                                "flex": 1,
-                                "dataIndex": "pr_brand",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商ID",
-                                "flex": 0,
-                                "dataIndex": "pr_vendid",
-                                "width": 0,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商编号",
-                                "flex": 1,
-                                "dataIndex": "pr_vendcode",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商名称",
-                                "flex": 1,
-                                "dataIndex": "pr_vendname",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "最小包装量",
-                                "flex": 1,
-                                "dataIndex": "pr_zxbzs",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }]
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
+                            "text": "物料编号",       
+                            "dataIndex": "pr_code",
+                            "width": 200,
+                        }, {
+                            "text": "物料名称",
+                            "width": 200,
+                            "dataIndex": "pr_detail",
+                        }, {
+                            "text": "规格",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        }, {
+                            "text": "单位",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
+                            "width": 200,
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
+                        }]
                     }) ;   
 
                 }

+ 4 - 2
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -121,7 +121,8 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 allowBlank:false,
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 8
+                    decimalPrecision: 8,
+                    minValue:0
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
@@ -170,7 +171,8 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 width : 120.0,
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 8
+                    decimalPrecision: 8,
+                    minValue:0
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');

+ 61 - 68
frontend/saas-web/app/view/sale/saleOut/FormPanelController.js

@@ -136,74 +136,67 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25
                         }],
-                        dbColumns:[
-                            {
-                                "text": "物料ID",
-                                "hidden": true,
-                                "dataIndex": "id",
-                            },{
-                                "text": "物料编号",
-                                "flex": 1,
-                                "dataIndex": "pr_code",
-                                "width": 100,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "物料名称",
-                                "flex": 1,
-                                "dataIndex": "pr_detail",
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "规格",
-                                "flex": 1,
-                                "dataIndex": "pr_spec",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "单位",
-                                "flex": 1,
-                                "dataIndex": "pr_unit",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "品牌",
-                                "flex": 1,
-                                "dataIndex": "pr_brand",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商ID",
-                                "flex": 0,
-                                "dataIndex": "pr_vendid",
-                                "width": 0,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商编号",
-                                "flex": 1,
-                                "dataIndex": "pr_vendcode",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "供应商名称",
-                                "flex": 1,
-                                "dataIndex": "pr_vendname",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }, {
-                                "text": "最小包装量",
-                                "flex": 1,
-                                "dataIndex": "pr_zxbzs",
-                                "width": 200,
-                                "xtype": "",
-                                "items": null
-                            }]
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
+                            "text": "物料编号",       
+                            "dataIndex": "pr_code",
+                            "width": 200,
+                        }, {
+                            "text": "物料名称",
+                            "width": 200,
+                            "dataIndex": "pr_detail",
+                        }, {
+                            "text": "规格",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        }, {
+                            "text": "单位",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
+                            "width": 200,
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
+                        }]
                     }) ;   
 
                 }

+ 46 - 53
frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js

@@ -125,73 +125,66 @@ Ext.define('saas.view.sale.saleout.QueryPanelController', {
                             allowBlank : true, 
                             columnWidth : 0.25
                         }],
-                        dbColumns:[
-                            {
-                                "text": "物料ID",
-                                "hidden": true,
-                                "dataIndex": "id",
-                            },{
-                            "text": "物料编号",
-                            "flex": 1,
+                        dbColumns:[{
+                            "text": "物料ID",
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "规格",
-                            "flex": 1,
                             "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 100,
                         }, {
                             "text": "单位",
-                            "flex": 1,
-                            "dataIndex": "pr_unit",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }, {
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
                             "text": "品牌",
-                            "flex": 1,
                             "dataIndex": "pr_brand",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "供应商ID",
-                            "flex": 0,
-                            "dataIndex": "pr_vendid",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "供应商编号",
-                            "flex": 1,
-                            "dataIndex": "pr_vendcode",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "供应商名称",
-                            "flex": 1,
+                            "width": 100,
+                        },{
+                            "text": "供应商",
                             "dataIndex": "pr_vendname",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "最小包装量",
-                            "flex": 1,
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
                         }]
                     }) ;   
 

+ 2 - 1
frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js

@@ -165,7 +165,8 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanel', {
                 width : 120.0,
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 8
+                    decimalPrecision: 8,
+                    minValue:0
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');

+ 6 - 46
frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js

@@ -209,102 +209,62 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             "text": "物料ID",
                             "hidden": true,
                             "dataIndex": "id",
-                        },{
+                        }, {
                             "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "width": 100,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "规格",
-                            "flex": 0,
                             "dataIndex": "pr_spec",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "单位",
-                            "flex": 0,
                             "dataIndex": "pr_spec",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "仓库id",
-                            "flex": 0,
                             "dataIndex": "pr_whid",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
                         },{
                             "text": "仓库编号",
-                            "flex": 0,
                             "dataIndex": "pr_whcode",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
                         },{
                             "text": "仓库",
-                            "flex": 0,
                             "dataIndex": "pr_whname",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         },{
                             "text": "总库存数",
-                            "flex": 0,
                             "dataIndex": "po_onhand",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "类型",
-                            "flex": 0,
                             "dataIndex": "pr_kind",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "型号",
-                            "flex": 0,
                             "dataIndex": "pr_orispeccode",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "品牌",
-                            "flex": 0,
                             "dataIndex": "pr_brand",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "供应商",
-                            "flex": 0,
                             "dataIndex": "pr_vendname",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "最小包装",
-                            "flex": 0,
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "L/T",
-                            "flex": 0,
                             "dataIndex": "pr_leadtime",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         }]
                     }) ;   
 

+ 48 - 26
frontend/saas-web/app/view/stock/appropriationInOut/QueryPanelController.js

@@ -117,40 +117,62 @@ Ext.define('saas.view.stock.appropriationInOut.QueryPanelController', {
                             "text": "物料ID",
                             "hidden": true,
                             "dataIndex": "id",
-                        },{
-                            "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
+                        }, {
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
-                            "text": "物料规格",
-                            "flex": 0,
+                            "text": "规格",
                             "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 100,
                         }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
+                            "text": "单位",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
                         }]
                     }) ;   
 

+ 5 - 3
frontend/saas-web/app/view/stock/make/FormPanel.js

@@ -72,10 +72,11 @@ Ext.define('saas.view.stock.make.FormPanel', {
         columnWidth: 0.2
     },
     {
-        xtype : "textfield", 
+        xtype : "numberfield", 
         name : "ma_qty", 
         fieldLabel : "数量",
-        columnWidth: 0.2
+        columnWidth: 0.2,
+        minValue:0
     },{
         xtype : "hidden", 
         name : "ma_whid", 
@@ -162,7 +163,8 @@ Ext.define('saas.view.stock.make.FormPanel', {
                 width : 120.0,
                 editor : {
                     xtype : "numberfield",
-                    decimalPrecision: 8
+                    decimalPrecision: 8,
+                    minValue:0
                 },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');

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

@@ -103,31 +103,64 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         //窗口列设置
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
-                            "text": "物料规格",
-                            "flex": 0,
+                            "text": "规格",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        }, {
+                            "text": "单位",
                             "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
                         }]
                     }) ;   
 
@@ -168,31 +201,64 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         //窗口列设置
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
+                            "hidden": true,
+                            "dataIndex": "id",
+                        }, {
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
-                            "text": "物料规格",
-                            "flex": 0,
+                            "text": "规格",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        }, {
+                            "text": "单位",
                             "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
                         }]
                     }) ;   
 

+ 42 - 140
frontend/saas-web/app/view/stock/make/QueryPanel.js

@@ -9,95 +9,30 @@ Ext.define('saas.view.stock.make.QueryPanel', {
     
     queryFormItems: [{
         xtype: 'hidden',
-        name: 'pu_id',
-        bind: '{pu_id}',
+        name: 'ma_id',
+        bind: '{ma_id}',
         fieldLabel: 'ID',
         allowBlank: true,
         getCondition: function(value) {
-            return 'pu_id=' + value;
+            return 'ma_id=' + value;
         }
-    }, {
+    },{
         xtype: 'textfield',
-        name: 'pu_code',
-        bind: '{pu_code}',
+        name: 'ma_code',
+        bind: '{ma_code}',
         fieldLabel: '单据编号'
-    }, {
-        xtype: 'condatefield',
-        name: 'pu_date',
-        bind: '{pu_date}',
-        fieldLabel: '采购日期',
-        columnWidth: 0.5,
-        operation: 'between'
-    }, {
-        xtype: 'dbfindtrigger',
-        name: 'pu_vendcode',
-        bind: '{pu_vendcode}',
-        fieldLabel: '供应商编号'
-    }, {
-        xtype: 'dbfindtrigger',
-        name: 'pu_vendname',
-        bind: '{pu_vendname}',
-        fieldLabel: '供应商名称'
-    }, {
-        xtype: 'dbfindtrigger',
-        name: 'pd_prodcode',
-        bind: '{pd_prodcode}',
-        fieldLabel: '物料编号',
-        showDetail: true
-    }, {
+    },{
         xtype: 'textfield',
-        name: 'pr_detail',
-        bind: '{pr_detail}',
-        fieldLabel: '物料名称',
-        showDetail: true
-    }, {
-        xtype: 'combobox',
-        name: 'pu_statuscode',
-        fieldLabel: '审核状态',
-        queryMode: 'local',
-        displayField: 'pu_status',
-        valueField: 'pu_statuscode',
-        editable:false,
-        store: Ext.create('Ext.data.ArrayStore', {
-            fields: ['pu_statuscode', 'pu_status'],
-            data: [
-                ["ALL", "全部"],
-                ["AUDITED", "已审核"],
-                ["UNAUDITED", "未审核"]
-            ]
-        }),
-        getCondition: function(value) {
-            if(value == 'ALL') {
-                return '1=1';
-            }else {
-                return 'pu_statuscode=\'' + value + '\'';
-            }
-        }
-    }, {
-        xtype: 'multicombo',
-        name: 'pu_acceptstatuscode',
-        bind: '{pu_acceptstatuscode}',
-        fieldLabel: '入库状态',
-        datas: [
-            ["TURNIN", "已入库"],
-            ["UNTURNIN", "未入库"],
-            ["PARTIN", "部分入库"]
-        ]
-    }],
-    moreQueryFormItems: [{
+        name: 'ma_type',
+        bind: '{ma_type}',
+        fieldLabel: '类型'
+    },{
         xtype: 'textfield',
-        name: 'pu_buyername',
-        fieldLabel: '采购员'
-    }, {
-        xtype: 'textfield',
-        name: 'pu_total',
-        fieldLabel: '金额'
-    }, {
-        xtype: 'condatefield',
-        name: 'pu_delivery',
-        fieldLabel: '交货日期',
-        columnWidth: 1
+        name: 'ma_prodcode',
+        bind: '{ma_prodcode}',
+        fieldLabel: '产品编号'
     }],
+    moreQueryFormItems: [],
     queryGridConfig: {
         idField: 'id',
         codeField: 'ma_code',
@@ -107,85 +42,52 @@ Ext.define('saas.view.stock.make.QueryPanel', {
         baseVastUrl: '/api/storage/make/',
         baseColumn: [{
             text: 'id',
-            dataIndex: 'pu_id',
+            dataIndex: 'id',
             width: 100,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
-            dataIndex: 'pu_code',
+            dataIndex: 'ma_code',
             width: 200
         }, {
-            text: '单据状态',
-            dataIndex: 'pu_status',
+            text: '类型',
+            dataIndex: 'ma_type',
             width: 120
         }, {
-            text: '下单日期',
-            dataIndex: 'pu_indate',
-            xtype: 'datecolumn',
+            text: '产品编号',
+            dataIndex: 'ma_prodcode',
             width: 200
         }, {
-            text: '供应商名称',
-            dataIndex: 'pu_vendname',
+            text: '产品名称',
+            dataIndex: 'ma_proddetail',
             width: 120
         }, {
-            text: '含税金额',
-            dataIndex: 'pu_taxtotal',
-            xtype: 'numbercolumn',
+            text: '版本号',
+            dataIndex: 'ma_version',
             width: 120
         }, {
-            text: '金额',
-            dataIndex: 'pu_total',
+            text: '数量',
+            dataIndex: 'ma_qty',
             xtype: 'numbercolumn',
             width: 120,
             flex: 1
-        }],
-        relativeColumn: [{
-            text: 'id',
-            dataIndex: 'pu_id',
-            width: 100,
-            xtype: 'numbercolumn'
-        }, {
-            text: '单据编号',
-            dataIndex: 'pu_code',
-            width: 200
-        }, {
-            text: '单据状态',
-            dataIndex: 'pu_status',
-            width: 120
-        }, {
-            text: '下单日期',
-            dataIndex: 'pu_indate',
-            xtype: 'datecolumn',
-            width: 200
-        }, {
-            text: '供应商名称',
-            dataIndex: 'pu_vendname',
-            width: 120
-        }, {
-            text: '采购序号',
-            dataIndex: 'pd_detno',
-            xtype: 'numbercolumn',
-            width: 120
-        }, {
-            text: '物料编号',
-            dataIndex: 'pd_prodcode',
-            width: 120
-        }, {
-            text: '数量',
-            dataIndex: 'pd_qty',
-            xtype: 'numbercolumn',
-            width: 120
-        }, {
-            text: '单价',
-            dataIndex: 'pd_price',
-            xtype: 'numbercolumn',
-            width: 120
-        }, {
-            text: '已转数',
-            dataIndex: 'pd_ytqy',
+        },{
+            text: '单位',
+            dataIndex: 'ma_produnit',
+            width: 120,
+            flex: 1
+        },{
+            text: '单位成本',
+            dataIndex: 'ma_total',
             xtype: 'numbercolumn',
             width: 120,
             flex: 1
-        }]
+        },{
+            text: '状态',
+            dataIndex: 'ma_status',
+            width: 120,
+            flex: 1
+        }],
+        relativeColumn: []
     }
 });

+ 49 - 23
frontend/saas-web/app/view/stock/make/QueryPanelController.js

@@ -118,37 +118,63 @@ Ext.define('saas.view.stock.make.QueryPanelController', {
                         dbColumns:[{
                             "text": "物料ID",
                             "hidden": true,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
+                            "dataIndex": "id",
+                        }, {
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
-                            "text": "物料规格",
-                            "flex": 0,
+                            "text": "规格",
                             "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 100,
                         }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
+                            "text": "单位",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
                         }]
                     }) ;   
 

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

@@ -191,7 +191,7 @@ Ext.define('saas.view.stock.otherIn.FormPanel', {
                 text : "仓库", 
                 dataIndex : "pd_whname", 
                 width : 120.0, 
-                items : null,
+                allowBlank : false,
                 editor : {
                     displayField : "display", 
                     editable : true, 

+ 7 - 49
frontend/saas-web/app/view/stock/otherIn/FormPanelController.js

@@ -214,106 +214,64 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         }],                        
                         dbColumns:[{
                             "text": "物料ID",
+                            "hidden": true,
                             "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "hidden": true
-                        },{
+                        }, {
                             "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "width": 100,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "规格",
-                            "flex": 0,
                             "dataIndex": "pr_spec",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "单位",
-                            "flex": 0,
                             "dataIndex": "pr_spec",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "仓库id",
-                            "flex": 0,
                             "dataIndex": "pr_whid",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
                         },{
                             "text": "仓库编号",
-                            "flex": 0,
                             "dataIndex": "pr_whcode",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
                         },{
                             "text": "仓库",
-                            "flex": 0,
                             "dataIndex": "pr_whname",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         },{
                             "text": "总库存数",
-                            "flex": 0,
                             "dataIndex": "po_onhand",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "类型",
-                            "flex": 0,
                             "dataIndex": "pr_kind",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "型号",
-                            "flex": 0,
                             "dataIndex": "pr_orispeccode",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "品牌",
-                            "flex": 0,
                             "dataIndex": "pr_brand",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "供应商",
-                            "flex": 0,
                             "dataIndex": "pr_vendname",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "最小包装",
-                            "flex": 0,
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "L/T",
-                            "flex": 0,
                             "dataIndex": "pr_leadtime",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         }]
                     });
 

+ 49 - 23
frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js

@@ -117,37 +117,63 @@ Ext.define('saas.view.stock.otherIn.QueryPanelController', {
                         dbColumns:[{
                             "text": "物料ID",
                             "hidden": true,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
+                            "dataIndex": "id",
+                        }, {
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
-                            "text": "物料规格",
-                            "flex": 0,
+                            "text": "规格",
                             "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 100,
                         }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
+                            "text": "单位",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
                         }]
                     }) ;   
 

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

@@ -187,7 +187,7 @@ Ext.define('saas.view.stock.otherOut.FormPanel', {
                 text: "仓库",
                 dataIndex: "pd_whname",
                 width: 120.0,
-                items: null,
+                allowBlank : false,
                 editor: {
                     displayField: "display",
                     editable: true,

+ 7 - 49
frontend/saas-web/app/view/stock/otherOut/FormPanelController.js

@@ -202,106 +202,64 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         }],                      
                         dbColumns:[{
                             "text": "物料ID",
+                            "hidden": true,
                             "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "hidden": true
-                        },{
+                        }, {
                             "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "width": 100,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "规格",
-                            "flex": 0,
                             "dataIndex": "pr_spec",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         }, {
                             "text": "单位",
-                            "flex": 0,
                             "dataIndex": "pr_spec",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "仓库id",
-                            "flex": 0,
                             "dataIndex": "pr_whid",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
                         },{
                             "text": "仓库编号",
-                            "flex": 0,
                             "dataIndex": "pr_whcode",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
+                            "hidden": true,
                         },{
                             "text": "仓库",
-                            "flex": 0,
                             "dataIndex": "pr_whname",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         },{
                             "text": "总库存数",
-                            "flex": 0,
                             "dataIndex": "po_onhand",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "类型",
-                            "flex": 0,
                             "dataIndex": "pr_kind",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "型号",
-                            "flex": 0,
                             "dataIndex": "pr_orispeccode",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "品牌",
-                            "flex": 0,
                             "dataIndex": "pr_brand",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "供应商",
-                            "flex": 0,
                             "dataIndex": "pr_vendname",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "最小包装",
-                            "flex": 0,
                             "dataIndex": "pr_zxbzs",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         },{
                             "text": "L/T",
-                            "flex": 0,
                             "dataIndex": "pr_leadtime",
                             "width": 100,
-                            "xtype": "",
-                            "items": null
                         }]
                     }) ;   
 

+ 49 - 23
frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js

@@ -117,37 +117,63 @@ Ext.define('saas.view.stock.otherOut.QueryPanelController', {
                         dbColumns:[{
                             "text": "物料ID",
                             "hidden": true,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
+                            "dataIndex": "id",
+                        }, {
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 200,
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 200,
                             "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
                         }, {
-                            "text": "物料规格",
-                            "flex": 0,
+                            "text": "规格",
                             "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 100,
                         }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
+                            "text": "单位",
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                        },{
+                            "text": "仓库id",
+                            "dataIndex": "pr_whid",
+                            "hidden": true,
+                        },{
+                            "text": "仓库编号",
+                            "dataIndex": "pr_whcode",
+                            "hidden": true,
+                        },{
+                            "text": "仓库",
+                            "dataIndex": "pr_whname",
                             "width": 200,
-                            "xtype": "",
-                            "items": null
+                        },{
+                            "text": "总库存数",
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                        },{
+                            "text": "类型",
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                        },{
+                            "text": "型号",
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                        },{
+                            "text": "品牌",
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                        },{
+                            "text": "供应商",
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                        },{
+                            "text": "最小包装",
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                        },{
+                            "text": "L/T",
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
                         }]
                     }) ;   
 

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

@@ -110,5 +110,16 @@ Ext.define('saas.view.sys.config.FormPanel', {
         allowBlank : true, 
         editable:false,
         columnWidth : 0.25
-    }]
+    }],
+
+    initComponent: function () {
+        var me = this,
+        viewModel = me.getViewModel();
+
+        viewModel.set('createTime', Ext.Date.format(new Date(), 'Y-m-d H:i:s'));
+        viewModel.set('updateTime', Ext.Date.format(new Date(), 'Y-m-d H:i:s'));
+        viewModel.setFormulas(o);
+        viewModel.set(statusCodeField, auditTexts.unAuditCode);
+        me.callParent(arguments);
+    }
 });

+ 105 - 0
frontend/saas-web/overrides/util/Collection.js

@@ -0,0 +1,105 @@
+Ext.define('saas.override.util.Collection', {
+    override: 'Ext.util.Collection',
+
+    _aggregators: {
+        average: function (items, begin, end, property, root) {
+            var n = end - begin;
+            return n &&
+                   this._aggregators.sum.call(this, items, begin, end, property, root) / n;
+        },
+ 
+        bounds: function (items, begin, end, property, root) {
+            for (var value, max, min, i = begin; i < end; ++i) {
+                value = items[i];
+                value = (root ? value[root] : value)[property];
+ 
+                // First pass max and min are undefined and since nothing is less than 
+                // or greater than undefined we always evaluate these "if" statements as 
+                // true to pick up the first value as both max and min. 
+                if (!(value < max)) { // jshint ignore:line 
+                    max = value;
+                }
+                if (!(value > min)) { // jshint ignore:line 
+                    min = value;
+                }
+            }
+ 
+            return [min, max];
+        },
+        
+        count: function(items) {
+            return items.length;
+        },
+ 
+        extremes: function (items, begin, end, property, root) {
+            var most = null,
+                least = null,
+                i, item, max, min, value;
+ 
+            for (i = begin; i < end; ++i) {
+                item = items[i];
+                value = (root ? item[root] : item)[property];
+ 
+                // Same trick as "bounds" 
+                if (!(value < max)) { // jshint ignore:line 
+                    max = value;
+                    most = item;
+                }
+                if (!(value > min)) { // jshint ignore:line 
+                    min = value;
+                    least = item;
+                }
+            }
+ 
+            return [least, most];
+        },
+ 
+        max: function (items, begin, end, property, root) {
+            var b = this._aggregators.bounds.call(this, items, begin, end, property, root);
+            return b[1];
+        },
+ 
+        maxItem: function (items, begin, end, property, root) {
+            var b = this._aggregators.extremes.call(this, items, begin, end, property, root);
+            return b[1];
+        },
+ 
+        min: function (items, begin, end, property, root) {
+            var b = this._aggregators.bounds.call(this, items, begin, end, property, root);
+            return b[0];
+        },
+ 
+        minItem: function (items, begin, end, property, root) {
+            var b = this._aggregators.extremes.call(this, items, begin, end, property, root);
+            return b[0];
+        },
+ 
+        // override
+        sum: function (items, begin, end, property, root) {
+            for (var value, sum = 0, i = begin; i < end; ++i) {
+                value = items[i];
+                value = (root ? value[root] : value)[property];
+                
+                var num1 = sum + '';
+                var num2 = value + '';
+    
+                var baseNum, baseNum1, baseNum2; 
+                try { 
+                    baseNum1 = num1.split(".")[1].length; 
+                } catch (e) { 
+                    baseNum1 = 0; 
+                } 
+                try { 
+                    baseNum2 = num2.split(".")[1].length; 
+                } catch (e) { 
+                    baseNum2 = 0;
+                } 
+                baseNum = Math.pow(10, Math.max(baseNum1, baseNum2));
+    
+                sum = (num1 * baseNum + num2 * baseNum) / baseNum;
+            }
+    
+            return sum;
+        }
+    },
+});