Browse Source

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

hy 7 years ago
parent
commit
6d76117741
94 changed files with 1563 additions and 1226 deletions
  1. 1 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  2. 1 2
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/EnterpriseController.java
  3. 0 2
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/MessageLogController.java
  4. 2 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/EndProductMapper.java
  5. 1 1
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/EndProductServiceImpl.java
  6. 8 0
      applications/commons/commons-server/src/main/resources/application.yml
  7. 7 5
      applications/commons/commons-server/src/main/resources/i18n/messages_zh_CN.properties
  8. 1 0
      applications/commons/commons-server/src/main/resources/logback-spring.xml
  9. 4 1
      applications/commons/commons-server/src/main/resources/mapper/EndProductMapper.xml
  10. 1 1
      applications/commons/commons-server/src/main/resources/mapper/MessagelogMapper.xml
  11. 4 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/VendorList.java
  12. 3 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java
  13. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductMapper.java
  14. 7 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductService.java
  15. 32 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java
  16. 8 0
      applications/document/document-server/src/main/resources/application.yml
  17. 1 0
      applications/document/document-server/src/main/resources/logback-spring.xml
  18. 15 1
      applications/document/document-server/src/main/resources/mapper/ProductMapper.xml
  19. 1 0
      applications/document/document-server/src/main/resources/mapper/VendorMapper.xml
  20. 10 2
      applications/money/money-server/src/main/resources/application.yml
  21. 52 9
      applications/money/money-server/src/main/resources/logback-spring.xml
  22. 1 13
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/PurchaseApplication.java
  23. 0 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java
  24. 0 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java
  25. 4 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchasedetailMapper.java
  26. 2 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  27. 8 0
      applications/purchase/purchase-server/src/main/resources/application.yml
  28. 1 0
      applications/purchase/purchase-server/src/main/resources/logback-spring.xml
  29. 0 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/ProdInOutController.java
  30. 0 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/SaleController.java
  31. 1 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  32. 5 4
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  33. 8 0
      applications/sale/sale-server/src/main/resources/application.yml
  34. 1 0
      applications/sale/sale-server/src/main/resources/logback-spring.xml
  35. 2 2
      applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml
  36. 8 0
      applications/storage/storage-server/src/main/resources/application.yml
  37. 1 0
      applications/storage/storage-server/src/main/resources/logback-spring.xml
  38. 12 0
      base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/controller/ResourceController.java
  39. 12 0
      base-servers/account/account-server/src/main/resources/application.yml
  40. 1 0
      base-servers/account/account-server/src/main/resources/logback-spring.xml
  41. 21 17
      base-servers/auth/auth-client/src/main/java/com/usoftchina/saas/auth/client/interceptor/AuthRestInterceptor.java
  42. 15 0
      base-servers/auth/auth-server/src/main/resources/application.yml
  43. 1 0
      base-servers/auth/auth-server/src/main/resources/logback-spring.xml
  44. 7 6
      base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/config/AuthFilter.java
  45. 12 1
      base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/error/MyExceptionHandler.java
  46. 12 0
      base-servers/gateway-server/src/main/resources/application.yml
  47. 1 0
      base-servers/gateway-server/src/main/resources/logback-spring.xml
  48. 12 0
      base-servers/ui-server/src/main/resources/application.yml
  49. 1 0
      base-servers/ui-server/src/main/resources/logback-spring.xml
  50. 29 0
      frontend/saas-web/Readme.md
  51. 66 67
      frontend/saas-web/app/Application.scss
  52. 2 2
      frontend/saas-web/app/model/purchase/prodIODetail.js
  53. 1 1
      frontend/saas-web/app/model/sale/ProdIODetail.js
  54. 2 1
      frontend/saas-web/app/model/sale/Saledetail.js
  55. 20 7
      frontend/saas-web/app/util/FormUtil.js
  56. 2 0
      frontend/saas-web/app/view/core/form/FormPanel.js
  57. 12 0
      frontend/saas-web/app/view/core/form/FormPanelController.js
  58. 22 0
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  59. 7 0
      frontend/saas-web/app/view/core/query/QueryPanel.js
  60. 2 2
      frontend/saas-web/app/view/core/tab/Controller.js
  61. 34 20
      frontend/saas-web/app/view/money/payBalance/FormPanel.js
  62. 9 1
      frontend/saas-web/app/view/money/payBalance/FormPanelController.js
  63. 48 19
      frontend/saas-web/app/view/money/payBalance/QueryPanelController.js
  64. 48 19
      frontend/saas-web/app/view/money/recBalance/QueryPanelController.js
  65. 11 5
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  66. 48 19
      frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js
  67. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  68. 9 50
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  69. 48 19
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js
  70. 15 6
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  71. 8 48
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  72. 47 18
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js
  73. 5 4
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  74. 61 68
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  75. 61 68
      frontend/saas-web/app/view/sale/sale/QueryPanelController.js
  76. 4 2
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  77. 61 68
      frontend/saas-web/app/view/sale/saleIn/FormPanelController.js
  78. 61 68
      frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js
  79. 5 3
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  80. 61 68
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  81. 46 53
      frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js
  82. 2 1
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanel.js
  83. 6 46
      frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js
  84. 48 26
      frontend/saas-web/app/view/stock/appropriationInOut/QueryPanelController.js
  85. 5 3
      frontend/saas-web/app/view/stock/make/FormPanel.js
  86. 116 48
      frontend/saas-web/app/view/stock/make/FormPanelController.js
  87. 42 140
      frontend/saas-web/app/view/stock/make/QueryPanel.js
  88. 49 23
      frontend/saas-web/app/view/stock/make/QueryPanelController.js
  89. 1 1
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  90. 11 53
      frontend/saas-web/app/view/stock/otherIn/FormPanelController.js
  91. 49 23
      frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js
  92. 1 1
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  93. 11 53
      frontend/saas-web/app/view/stock/otherOut/FormPanelController.js
  94. 49 23
      frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js

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

@@ -25,6 +25,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     BIZ_AUDITED(79303,"只能审核未审核的单据"),
     BIZ_UNAUDITED(79304,"只能反审核已审核的单据"),
     BIZ_DELETE(79305,"只能删除未审核的单据"),
+    BIZ_RELDELETE(79305,"存在关联单据,不允许删除"),
     NO_OPRATIONDATA(79400,"无可操作单据"),
     BOM_SAVE(79401, "产品编号+版本号已存在"),
     REPEAT_NAME(79501, "名称重复"),

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

@@ -17,8 +17,7 @@ public class EnterpriseController {
 
     @GetMapping("/read")
     public Result getList(){
-        enterpriseService.findByPrimaryKey(BaseContextHolder.getCompanyId());
-        return Result.success();
+        return Result.success(enterpriseService.findByPrimaryKey(BaseContextHolder.getCompanyId()));
     }
 
     @PostMapping("/save")

+ 0 - 2
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/MessageLogController.java

@@ -27,8 +27,6 @@ public class MessageLogController {
     private MessageLogService messageLogService;
 
     /**
-     * 采购订单列表
-     *
      * @param page
      * @param req
      * @return

+ 2 - 0
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/mapper/EndProductMapper.java

@@ -12,6 +12,8 @@ public interface EndProductMapper {
 
     String selectPeriod(@Param("companyId") Long companyId);
 
+    String selectUnPeriod(@Param("companyId") Long companyId);
+
     List<MessagelogDTO> getListData(@Param("condition") String condition, @Param("companyId") Long companyId);
 
     void updatePeriodStatus(@Param("status") Long status,@Param("period") String period, @Param("companyId") Long companyId);

+ 1 - 1
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/EndProductServiceImpl.java

@@ -70,7 +70,7 @@ public class EndProductServiceImpl implements EndProductService {
 
     @Override
     public void unEndAccount() {
-        String period = endProductMapper.selectPeriod(BaseContextHolder.getCompanyId());
+        String period = endProductMapper.selectUnPeriod(BaseContextHolder.getCompanyId());
         if (StringUtils.isEmpty(period)){
             throw new BizException(79306,"系统还未结账,不能反结账");
         }else{

+ 8 - 0
applications/commons/commons-server/src/main/resources/application.yml

@@ -34,6 +34,14 @@ spring:
   sleuth:
     sampler:
       probability: 1.0
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
 eureka:
   instance:
     leaseRenewalIntervalInSeconds: 10

+ 7 - 5
applications/commons/commons-server/src/main/resources/i18n/messages_zh_CN.properties

@@ -54,10 +54,10 @@ msg.resFreeze=\u53d6\u6d88\u51bb\u7ed3\u64cd\u4f5c
 msg.resFreezeSuccess=\u53d6\u6d88\u51bb\u7ed3\u6210\u529f
 msg.resStart=\u91cd\u542f\u64cd\u4f5c
 msg.resStartSuccess=\u91cd\u542f\u6210\u529f
-msg.close=\u7ed3\u6848\u64cd\u4f5c
-msg.closeSuccess=\u7ed3\u6848\u6210\u529f
-msg.resClose=\u53d6\u6d88\u7ed3\u6848\u64cd\u4f5c
-msg.resCloseSuccess=\u53d6\u6d88\u7ed3\u6848\u6210\u529f
+msg.close=\u5173\u95ed\u64cd\u4f5c
+msg.closeSuccess=\u5173\u95ed\u6210\u529f
+msg.resClose=\u5f00\u542f\u64cd\u4f5c
+msg.resCloseSuccess=\u5f00\u542f\u6210\u529f
 msg.turnPurchase=\u8f6c\u91c7\u8d2d\u5355\u64cd\u4f5c
 msg.turnMake=\u8f6c\u5236\u9020\u5355\u64cd\u4f5c
 msg.turnOutSource=\u8f6c\u59d4\u5916\u5355\u64cd\u4f5c
@@ -117,4 +117,6 @@ msg.getARBill=\u83b7\u53d6\u5e94\u6536\u53d1\u7968
 msg.getAPBill=\u83b7\u53d6\u5e94\u4ed8\u53d1\u7968
 msg.getSuccess=\u83b7\u53d6\u6210\u529f
 msg.endProdudct=\u8bb0\u8d26\u64cd\u4f5c
-msg.endProdudctSuccess=\u7ed3\u8d26\u6210\u529f
+msg.endProdudctSuccess=\u8bb0\u8d26\u6210\u529f
+msg.unEndProduct=\u53cd\u8bb0\u8d26\u64cd\u4f5c
+msg.unEndProductSuccess=\u53cd\u8bb0\u8d26\u6210\u529f

+ 1 - 0
applications/commons/commons-server/src/main/resources/logback-spring.xml

@@ -97,6 +97,7 @@
 
     <springProfile name="docker">
         <logger name="org.springframework" level="WARN"/>
+        <logger name="com.usoftchina.saas" level="WARN"/>
         <root level="WARN">
             <appender-ref ref="CONSOLE_APPENDER"/>
             <appender-ref ref="JSON_APPENDER"/>

+ 4 - 1
applications/commons/commons-server/src/main/resources/mapper/EndProductMapper.xml

@@ -10,6 +10,9 @@
     <select id="selectPeriod" resultType="string">
         select PD_DETNO from periodsdetail where companyid=#{companyId} and pd_status=0 order by PD_DETNO LIMIT 1;
     </select>
+    <select id="selectUnPeriod" resultType="string">
+        select PD_DETNO from periodsdetail where companyid=#{companyId} and pd_status=99 order by PD_DETNO desc LIMIT 1;
+    </select>
     <resultMap id="MsgResult" type="com.usoftchina.saas.commons.dto.MessagelogDTO">
         <result column="ml_content" property="ml_content" jdbcType="VARCHAR" />
         <result column="ml_result" property="ml_result" jdbcType="VARCHAR" />
@@ -19,7 +22,7 @@
         <result column="ml_keyvalue" property="ml_keyvalue" jdbcType="INTEGER" />
     </resultMap>
     <select id="getListData" resultMap="MsgResult">
-        SELECT * FROM MESSAGELOG WHERE ML_CALLER='EndProduct' AND COMPANYID=#{companyId} AND ml_result='记账成功'
+        SELECT * FROM MESSAGELOG WHERE ML_CALLER='EndProduct' AND COMPANYID=#{companyId} AND ml_result like '%记账成功' ORDER BY ML_ID DESC
     </select>
 
     <select id="endProduct" parameterMap="spParamMap" statementType="CALLABLE">

+ 1 - 1
applications/commons/commons-server/src/main/resources/mapper/MessagelogMapper.xml

@@ -315,6 +315,6 @@
         and  companyId = #{companyId}
       </if>
     </where>
-    order by ml_id
+    order by ml_id DESC
   </select>
 </mapper>

+ 4 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/VendorList.java

@@ -82,6 +82,10 @@ public class VendorList implements Serializable {
      * 自定义字段
      */
     private String ve_text1;
+    /**
+     * 应付款金额
+     */
+    private double ve_leftamount;
     /**
      * 自定义字段
      */

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

@@ -57,7 +57,7 @@ public class ProductController {
 
     @PostMapping("/delete/{id}")
     public Result delete(@PathVariable("id") Long id){
-        productService.removeByPrimaryKey(id);
+        productService.deleteByPrimaryKey(id);
         return Result.success();
     }
 
@@ -98,10 +98,9 @@ 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();
+        return Result.success(productService.getReserveCost(page, listReqDTO));
     }
 
 }

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

@@ -24,4 +24,13 @@ public interface ProductMapper extends CommonBaseMapper<Product> {
     String getCodeById(@Param("id") Long id);
 
     List<ProductReserveCostDTO> selectReserveCost(@Param("con") String con, @Param("companyId") Long companyId);
+
+    int getCountFromPurc(@Param("id") Long id, @Param("companyId") Long companyId);
+
+    int getCountFromSale(@Param("id") Long id, @Param("companyId") Long companyId);
+
+    int getCountFromBom(@Param("id") Long id, @Param("companyId") Long companyId);
+
+    int getCountFromProdIO(@Param("id") Long id, @Param("companyId") Long companyId);
+
 }

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

@@ -81,6 +81,13 @@ public interface ProductService extends CommonBaseService<ProductMapper, Product
      */
     String batchOpen(BatchDealBaseDTO baseDTOs);
 
+    /**
+     * 删除
+     * @param id
+     * @return
+     */
+    boolean deleteByPrimaryKey(Long id);
+
     /**
      * 批量删除
      * @param baseDTOs

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

@@ -168,6 +168,38 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         return errorMsg.toString();
     }
 
+    @Override
+    public boolean deleteByPrimaryKey(Long id) {
+        //校验物料是否已经在使用状态(采购单、销售单、BOM、出入库单)
+        validEnableDel(id);
+        return false;
+    }
+
+    private void validEnableDel(Long id) {
+        int count = 0;
+        //采购
+        count = getMapper().getCountFromPurc(id, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.BIZ_RELDELETE);
+        }
+        //销售
+        count = getMapper().getCountFromSale(id, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.BIZ_RELDELETE);
+        }
+        //BOM
+        count = getMapper().getCountFromBom(id, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.BIZ_RELDELETE);
+        }
+        //出入库
+        count = getMapper().getCountFromProdIO(id, BaseContextHolder.getCompanyId());
+        if (count > 0){
+            throw new BizException(BizExceptionCode.BIZ_RELDELETE);
+        }
+        //batch
+    }
+
     @Override
     public boolean batchDelete(BatchDealBaseDTO baseDTOs) {
         for(DocBaseDTO docBaseDTO : baseDTOs.getBaseDTOs()){

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

@@ -48,6 +48,14 @@ eureka:
     registryFetchIntervalSeconds: 5
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
 server:
   port: 9480
   tomcat:

+ 1 - 0
applications/document/document-server/src/main/resources/logback-spring.xml

@@ -97,6 +97,7 @@
 
     <springProfile name="docker">
         <logger name="org.springframework" level="WARN"/>
+        <logger name="com.usoftchina.saas" level="WARN"/>
         <root level="WARN">
             <appender-ref ref="CONSOLE_APPENDER"/>
             <appender-ref ref="JSON_APPENDER"/>

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

@@ -66,7 +66,7 @@
                 ${con}
             </if>
             <if test="companyId != null">
-                and  PRODUCT.companyid = #{companyId}
+                and  PRODUCT.companyid = #{companyId} and productonhand.companyId=#{companyId}
             </if>
         </where>
     </select>
@@ -489,5 +489,19 @@
         </where>
         ORDER BY PR_ID DESC
     </select>
+    <select id="getCountFromPurc" resultType="int">
+        SELECT COUNT(*) FROM PURCHASEDETAIL
+        WHERE PD_PRODID = #{id} AND COMPANYID=#{companyId}
+    </select>
+    <select id="getCountFromSale" resultType="int">
+        SELECT COUNT(*) FROM SALEDETAIL
+        WHERE SD_PRODID = #{id} AND COMPANYID=#{companyId}
+    </select>
+    <select id="getCountFromBom" resultType="int">
+        SELECT COUNT(*) FROM BOMDETAIL WHERE BD_SONID=#{id} AND COMPANYID=#{companyId}
+    </select>
+    <select id="getCountFromProdIO" resultType="int">
+        SELECT COUNT(*) FROM PRODIODETAIL WHERE PD_PRODID=#{id} AND COMPANYID=#{companyId}
+    </select>
 </mapper>
 

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

@@ -72,6 +72,7 @@
         <result column="ve_recordid" property="ve_recordid" jdbcType="INTEGER" />
         <result column="ve_recordname" property="ve_recordname" jdbcType="VARCHAR" />
         <result column="ve_initdate" property="ve_initdate" jdbcType="TIMESTAMP" />
+        <result column="ve_leftamount" property="ve_leftamount" jdbcType="INTEGER" />
         <result column="ve_text1" property="ve_text1" jdbcType="VARCHAR" />
         <result column="ve_text2" property="ve_text2" jdbcType="VARCHAR" />
         <result column="ve_text3" property="ve_text3" jdbcType="VARCHAR" />

+ 10 - 2
applications/money/money-server/src/main/resources/application.yml

@@ -22,8 +22,8 @@ spring:
     host: 192.168.0.176
     port: 5672
     virtual-host: dev
-    password: saas
-    username: select123***
+    username: saas
+    password: select123***
   zipkin:
     sender:
       type: rabbit
@@ -45,6 +45,14 @@ eureka:
     registryFetchIntervalSeconds: 5
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
 server:
   port: 8880
   tomcat:

+ 52 - 9
applications/money/money-server/src/main/resources/logback-spring.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
-    <include resource="org/springframework/boot/logging/logback/defaults.xml" />
+    <include resource="org/springframework/boot/logging/logback/base.xml" />
     <jmxConfigurator/>
 
     <!--
@@ -28,10 +28,10 @@
     <springProperty scope="context" name="spring.profiles.active" source="spring.profiles.active" defaultValue="dev"/>
     <springProperty scope="context" name="common-pattern" source="logging.common-pattern" defaultValue="%d{yyyy-MM-dd HH:mm:ss.SSS}:[%5p] [%t:%r] [%C{1}:%M:%L] --> %m%n"/>
     <springProperty scope="context" name="log.level.console" source="logging.level.console" defaultValue="INFO"/>
+    <springProperty scope="context" name="log.destination" source="logging.destination" defaultValue="192.168.253.3:5000"/>
 
     <contextName>${spring.application.name}-${spring.profiles.active}-logback</contextName>
 
-
     <appender name="CONSOLE_APPENDER" class="ch.qos.logback.core.ConsoleAppender">
         <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
             <level>${log.level.console}</level>
@@ -44,11 +44,9 @@
     <appender name="ROOT_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
         <file>${log.path}/root.log</file>
         <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-            <!-- 每天一归档 -->
             <fileNamePattern>${log.path}/%d{yyyy-MM}/root-%d{yyyy-MM-dd}-%i.log.gz</fileNamePattern>
-            <!-- 单个日志文件最多 100MB, 60天的日志周期,最大不能超过20GB -->
             <maxFileSize>128MB</maxFileSize>
-            <maxHistory>60</maxHistory>
+            <maxHistory>7</maxHistory>
             <totalSizeCap>20GB</totalSizeCap>
         </rollingPolicy>
         <encoder>
@@ -56,9 +54,54 @@
         </encoder>
     </appender>
 
-    <root level="${log.level.console}">
-        <appender-ref ref="CONSOLE_APPENDER"/>
-        <appender-ref ref="ROOT_APPENDER"/>
-    </root>
+    <!-- Appender to log in a JSON format -->
+    <appender name="JSON_APPENDER" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
+        <destination>${log.destination}</destination>
+        <encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder">
+            <providers>
+                <pattern>
+                    <pattern>
+                        {
+                        "severity": "%level",
+                        "service": "${spring.application.name:-}",
+                        "trace": "%X{X-B3-TraceId:-}",
+                        "span": "%X{X-B3-SpanId:-}",
+                        "parent": "%X{X-B3-ParentSpanId:-}",
+                        "exportable": "%X{X-Span-Export:-}",
+                        "pid": "${PID:-}",
+                        "thread": "%thread",
+                        "class": "%logger{40}",
+                        "rest": "%message"
+                        }
+                    </pattern>
+                </pattern>
+            </providers>
+        </encoder>
+    </appender>
+
+    <logger name="org.springframework" level="INFO"/>
+    <logger name="com.usoftchina.saas" level="INFO"/>
+
+    <springProfile name="dev">
+        <root level="INFO">
+            <appender-ref ref="CONSOLE_APPENDER"/>
+        </root>
+    </springProfile>
+
+    <springProfile name="test">
+        <root level="INFO">
+            <appender-ref ref="CONSOLE_APPENDER"/>
+            <appender-ref ref="ROOT_APPENDER"/>
+        </root>
+    </springProfile>
+
+    <springProfile name="docker">
+        <logger name="org.springframework" level="WARN"/>
+        <logger name="com.usoftchina.saas" level="WARN"/>
+        <root level="WARN">
+            <appender-ref ref="CONSOLE_APPENDER"/>
+            <appender-ref ref="JSON_APPENDER"/>
+        </root>
+    </springProfile>
 
 </configuration>

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

+ 0 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java

@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.*;
  * Created by zdw
  * 2018-10-17 11:41.
  */
-@CrossOrigin
 @RestController
 @RequestMapping("/prodinout")
 public class ProdInOutController {

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

@@ -18,7 +18,6 @@ import org.springframework.web.bind.annotation.*;
  * @author yingp
  * @date 2018/10/9
  */
-@CrossOrigin
 @RestController
 @RequestMapping("/purchase")
 public class PurchaseController {

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

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

@@ -194,11 +194,11 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     private void getVendorTaxrate(Long pu_id) {
-        purchasedetailMapper.getVendorTaxrate(pu_id);
+//        purchasedetailMapper.getVendorTaxrate(pu_id);
     }
 
     private void getPrice(Long pu_id) {
-        purchasedetailMapper.getPrice(pu_id);
+//        purchasedetailMapper.getPrice(pu_id);
     }
 
 

+ 8 - 0
applications/purchase/purchase-server/src/main/resources/application.yml

@@ -48,6 +48,14 @@ eureka:
     registryFetchIntervalSeconds: 5
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
 server:
   port: 8800
   tomcat:

+ 1 - 0
applications/purchase/purchase-server/src/main/resources/logback-spring.xml

@@ -97,6 +97,7 @@
 
     <springProfile name="docker">
         <logger name="org.springframework" level="WARN"/>
+        <logger name="com.usoftchina.saas" level="WARN"/>
         <root level="WARN">
             <appender-ref ref="CONSOLE_APPENDER"/>
             <appender-ref ref="JSON_APPENDER"/>

+ 0 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/ProdInOutController.java

@@ -18,7 +18,6 @@ import org.springframework.web.bind.annotation.*;
  * Created by wyx
  * 2018-10-23.
  */
-@CrossOrigin
 @RestController
 @RequestMapping("/prodinout")
 public class ProdInOutController {

+ 0 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/SaleController.java

@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.*;
  * @author: guq
  * @create: 2018-10-22 11:28
  **/
-@CrossOrigin
 @RestController
 @RequestMapping("/sale")
 public class SaleController {

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

@@ -444,7 +444,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 targetPid.setPd_piid(pi_id);
                 targetPid.setPd_inoutno(piInoutno);
                 targetPid.setPd_piclass(BillCodeSeq.SALEIN.getName());
-                targetPid.setPd_pdno(i);
+                targetPid.setPd_pdno(i + 1);
                 targetPid.setPd_orderid(sourcePid.getPd_orderid());
                 targetPid.setPd_ordercode(sourcePid.getPd_ordercode());
                 targetPid.setPd_orderdetno(sourcePid.getPd_orderdetno());

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

@@ -160,6 +160,7 @@ public class SaleServiceImpl implements SaleService{
             SaleDetail detail = BeanMapper.map(item, SaleDetail.class);
             detail.setSd_said(sa_id);
             detail.setSd_code(sa_code);
+            detail.setCompanyId(companyId);
             if (StringUtils.isEmpty(detail.getId()) || "0".equals(detail.getId().toString())) {
                 insertDetails.add(detail);
             } else {
@@ -442,13 +443,13 @@ public class SaleServiceImpl implements SaleService{
         prodInOutMapper.insertSelective(prodInOut);
         //插入出货单从表
         long pi_id = prodInOut.getId();
-        for (int i=0;i<details.size();i++){
+        for (int i = 0; i < details.size(); i++){
             SaleDetail saleDetail =details.get(i);
             ProdIODetail prodIODetail = new ProdIODetail();
             prodIODetail.setPd_piid(pi_id);
             prodIODetail.setPd_inoutno(pi_inoutno);
             prodIODetail.setPd_piclass(BillCodeSeq.SALEOUT.getName());
-            prodIODetail.setPd_pdno(i);
+            prodIODetail.setPd_pdno(i + 1);
             prodIODetail.setPd_orderid(sale.getId());
             prodIODetail.setPd_ordercode(sale.getSa_code());
             prodIODetail.setPd_orderdetno(saleDetail.getSd_detno());
@@ -460,7 +461,7 @@ public class SaleServiceImpl implements SaleService{
             //公司id
             prodIODetail.setCompanyId(companyId);
             //本次转单数
-            prodIODetail.setPd_outqty((saleDetail.getSd_qty()-saleDetail.getSd_yqty()));
+            prodIODetail.setPd_outqty(saleDetail.getSd_qty() - saleDetail.getSd_yqty());
             prodIODetailMapper.insertSelective(prodIODetail);
             //更新已转数
             saleDetail.setSd_yqty(saleDetail.getSd_qty());
@@ -472,8 +473,8 @@ public class SaleServiceImpl implements SaleService{
         sale.setSa_sendstatuscode(Status.TURNOUT.name());
         //更新存在字段
         saleMapper.updateByPrimaryKeySelective(sale);
-        prodInOutMapper.updatePiTotal(pi_id);
         prodIODetailMapper.updatePDSaleOut(pi_id);
+        prodInOutMapper.updatePiTotal(pi_id);
         //日志记录
         DocBaseDTO baseDTO = new DocBaseDTO(pi_id, pi_inoutno, BillCodeSeq.SALEOUT.getName());
         messageLogService.customizeLog(baseDTO, Operation.TURNPRODOUT);

+ 8 - 0
applications/sale/sale-server/src/main/resources/application.yml

@@ -46,6 +46,14 @@ eureka:
     registryFetchIntervalSeconds: 5
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
 server:
   port: 8820
   tomcat:

+ 1 - 0
applications/sale/sale-server/src/main/resources/logback-spring.xml

@@ -97,6 +97,7 @@
 
     <springProfile name="docker">
         <logger name="org.springframework" level="WARN"/>
+        <logger name="com.usoftchina.saas" level="WARN"/>
         <root level="WARN">
             <appender-ref ref="CONSOLE_APPENDER"/>
             <appender-ref ref="JSON_APPENDER"/>

+ 2 - 2
applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -767,8 +767,8 @@ update prodiodetail a
   <update id="updatePDSaleOut" parameterType="long">
     update prodiodetail set
     pd_total=round(IFNULL(pd_outqty,0)*IFNULL(pd_sendprice,0),2),
-    pd_netprice = round(IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),0),
-    pd_nettotal = round((IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_outqty,0),0)
+    pd_netprice = round(IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),2),
+    pd_nettotal = round((IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_outqty,0),2)
     where pd_piid=#{id}
   </update>
 </mapper>

+ 8 - 0
applications/storage/storage-server/src/main/resources/application.yml

@@ -48,6 +48,14 @@ eureka:
     registryFetchIntervalSeconds: 5
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
 server:
   port: 9000
   tomcat:

+ 1 - 0
applications/storage/storage-server/src/main/resources/logback-spring.xml

@@ -97,6 +97,7 @@
 
     <springProfile name="docker">
         <logger name="org.springframework" level="WARN"/>
+        <logger name="com.usoftchina.saas" level="WARN"/>
         <root level="WARN">
             <appender-ref ref="CONSOLE_APPENDER"/>
             <appender-ref ref="JSON_APPENDER"/>

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

@@ -1,5 +1,6 @@
 package com.usoftchina.saas.account.controller;
 
+import com.usoftchina.saas.account.cache.ResourceCache;
 import com.usoftchina.saas.account.dto.ResourceModuleDTO;
 import com.usoftchina.saas.account.dto.UrlResourceDTO;
 import com.usoftchina.saas.account.service.ResourceService;
@@ -53,4 +54,15 @@ public class ResourceController {
         return Result.success(resourcesService.findUrlResourcesByAppId(appId));
     }
 
+    /**
+     * 缓存清除
+     *
+     * @return
+     */
+    @GetMapping("/cache/clear")
+    public Result clearCache() {
+        ResourceCache.of(BaseContextHolder.getAppId()).hdel();
+        return Result.success();
+    }
+
 }

+ 12 - 0
base-servers/account/account-server/src/main/resources/application.yml

@@ -55,6 +55,18 @@ server:
   port: 8580
   tomcat:
     uri-encoding: UTF-8
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+    restart:
+      enabled: true
 info:
   name: '@project.artifactId@'
   description: '@project.description@'

+ 1 - 0
base-servers/account/account-server/src/main/resources/logback-spring.xml

@@ -97,6 +97,7 @@
 
     <springProfile name="docker">
         <logger name="org.springframework" level="WARN"/>
+        <logger name="com.usoftchina.saas" level="WARN"/>
         <root level="WARN">
             <appender-ref ref="CONSOLE_APPENDER"/>
             <appender-ref ref="JSON_APPENDER"/>

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

@@ -27,23 +27,27 @@ public class AuthRestInterceptor extends HandlerInterceptorAdapter {
 
     @Override
     public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
-        HandlerMethod handlerMethod = (HandlerMethod) handler;
-        // 配置该注解,说明不进行用户拦截
-        IgnoreAuth annotation = handlerMethod.getBeanType().getAnnotation(IgnoreAuth.class);
-        if (annotation == null) {
-            annotation = handlerMethod.getMethodAnnotation(IgnoreAuth.class);
-        }
-        if (annotation != null) {
-            return super.preHandle(request, response, handler);
-        }
-        String token = request.getHeader(authConfig.getAuthHeader());
-        if (null != token) {
-            JwtInfo infoFromToken = JwtHelper.getInfoFromToken(token, authConfig.getPublicKey());
-            BaseContextHolder.setAppId(infoFromToken.getAppId());
-            BaseContextHolder.setUserId(infoFromToken.getUserId());
-            BaseContextHolder.setCompanyId(infoFromToken.getCompanyId());
-            BaseContextHolder.setToken(token);
-            log.info("token={} \\r\\n userName={}", token, infoFromToken.getUserName());
+        if (handler instanceof HandlerMethod) {
+            HandlerMethod handlerMethod = (HandlerMethod) handler;
+            // 配置该注解,说明不进行用户拦截
+            IgnoreAuth annotation = handlerMethod.getBeanType().getAnnotation(IgnoreAuth.class);
+            if (annotation == null) {
+                annotation = handlerMethod.getMethodAnnotation(IgnoreAuth.class);
+            }
+            if (annotation != null) {
+                return super.preHandle(request, response, handler);
+            }
+            String token = request.getHeader(authConfig.getAuthHeader());
+            if (null != token) {
+                JwtInfo infoFromToken = JwtHelper.getInfoFromToken(token, authConfig.getPublicKey());
+                BaseContextHolder.setAppId(infoFromToken.getAppId());
+                BaseContextHolder.setUserId(infoFromToken.getUserId());
+                BaseContextHolder.setCompanyId(infoFromToken.getCompanyId());
+                BaseContextHolder.setToken(token);
+                log.info("token={} \\r\\n userName={}", token, infoFromToken.getUserName());
+            }
+        } else {
+            // no mapping
         }
         return super.preHandle(request, response, handler);
     }

+ 15 - 0
base-servers/auth/auth-server/src/main/resources/application.yml

@@ -35,6 +35,9 @@ spring:
       connection-timeout: 30000
   messages:
     basename: i18n/messages
+  redis:
+    host: 192.168.253.12
+    port: 6379
 eureka:
   instance:
     leaseRenewalIntervalInSeconds: 10
@@ -52,6 +55,18 @@ server:
   port: 8600
   tomcat:
     uri-encoding: UTF-8
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+    restart:
+      enabled: true
 info:
   name: '@project.artifactId@'
   description: '@project.description@'

+ 1 - 0
base-servers/auth/auth-server/src/main/resources/logback-spring.xml

@@ -97,6 +97,7 @@
 
     <springProfile name="docker">
         <logger name="org.springframework" level="WARN"/>
+        <logger name="com.usoftchina.saas" level="WARN"/>
         <root level="WARN">
             <appender-ref ref="CONSOLE_APPENDER"/>
             <appender-ref ref="JSON_APPENDER"/>

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

+ 12 - 1
base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/error/MyExceptionHandler.java

@@ -1,5 +1,8 @@
 package com.usoftchina.saas.gateway.error;
 
+import com.usoftchina.saas.exception.BaseException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.boot.autoconfigure.web.ErrorProperties;
 import org.springframework.boot.autoconfigure.web.ResourceProperties;
 import org.springframework.boot.autoconfigure.web.reactive.error.DefaultErrorWebExceptionHandler;
@@ -20,6 +23,8 @@ import java.util.Map;
  */
 public class MyExceptionHandler extends DefaultErrorWebExceptionHandler {
 
+    private Logger logger = LoggerFactory.getLogger(MyExceptionHandler.class);
+
     public MyExceptionHandler(ErrorAttributes errorAttributes, ResourceProperties resourceProperties,
                               ErrorProperties errorProperties, ApplicationContext applicationContext) {
         super(errorAttributes, resourceProperties, errorProperties, applicationContext);
@@ -32,10 +37,16 @@ public class MyExceptionHandler extends DefaultErrorWebExceptionHandler {
     protected Map<String, Object> getErrorAttributes(ServerRequest request, boolean includeStackTrace) {
         int code = 500;
         Throwable error = super.getError(request);
+        String message = error.getMessage();
         if (error instanceof NotFoundException) {
             code = 404;
+        } else if (error instanceof BaseException) {
+            BaseException e = (BaseException) error;
+            code = e.getCode();
+            message = e.getMessage();
         }
-        return response(code, this.buildMessage(request, error));
+        logger.error(this.buildMessage(request, error));
+        return response(code, message);
     }
 
     /**

+ 12 - 0
base-servers/gateway-server/src/main/resources/application.yml

@@ -124,6 +124,18 @@ eureka:
     registryFetchIntervalSeconds: 5
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+    restart:
+      enabled: true
 feign:
   hystrix:
     enabled: true

+ 1 - 0
base-servers/gateway-server/src/main/resources/logback-spring.xml

@@ -97,6 +97,7 @@
 
     <springProfile name="docker">
         <logger name="org.springframework" level="WARN"/>
+        <logger name="com.usoftchina.saas" level="WARN"/>
         <root level="WARN">
             <appender-ref ref="CONSOLE_APPENDER"/>
             <appender-ref ref="JSON_APPENDER"/>

+ 12 - 0
base-servers/ui-server/src/main/resources/application.yml

@@ -42,6 +42,18 @@ eureka:
     registryFetchIntervalSeconds: 5
     serviceUrl:
       defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
+management:
+  endpoints:
+    web:
+      exposure:
+        include: "*"
+  endpoint:
+    health:
+      show-details: always
+    shutdown:
+      enabled: true
+    restart:
+      enabled: true
 info:
   name: '@project.artifactId@'
   description: '@project.description@'

+ 1 - 0
base-servers/ui-server/src/main/resources/logback-spring.xml

@@ -97,6 +97,7 @@
 
     <springProfile name="docker">
         <logger name="org.springframework" level="WARN"/>
+        <logger name="com.usoftchina.saas" level="WARN"/>
         <root level="WARN">
             <appender-ref ref="CONSOLE_APPENDER"/>
             <appender-ref ref="JSON_APPENDER"/>

+ 29 - 0
frontend/saas-web/Readme.md

@@ -149,6 +149,31 @@ viewModel: view.core.query.QueryPanelModel
 | baseColumn | 基础列配置 | √ | [ Column ] |
 | relativeColumn | 关联列设置 | x | [ Column ] |
 
+## 放大镜配置
+
+dbfindtrigger,用于选择基础资料
+
+| 字段 | 说明 | 必填 | 样例 |
+| --- | --- | --- | --- |
+| dataUrl | 查询接口 | √ | "/api/document/vendor/list" |
+| addXtype | 新增基础资料页面xtype | √ | "document-vendor-formpanel" |
+| addTitle | 新增单据名称,新增tab标题 | √ | "供应商资料" |
+| dbfinds | 字段赋值配置,from:基础资料字段;to: 主表或从表字段;ignore:非模糊查询字段 | √ | [{
+                            from:'id',to:'pu_vendid',ignore:true
+                        },{
+                            from:'ve_code',to:'pu_vendcode'
+                        },{
+                            from:'ve_name',to:'pu_vendname'
+                        }] |
+| dbtpls | 模糊查询展示列 | √ | [{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }] |
+| defaultCondition | 默认查询条件 | x | "ve_statuscode='OPEN'" |
+| dbSearchFields | 自定义查询字段 | √ | [ Ext.form.field ] |
+| dbColumns | 列配置 | √ | [ Ext.grid.column ] |
+
 ---
 
 ### 前端配置调整日志
@@ -173,5 +198,9 @@ deleteDetailUrl 配置调整 formpanel.form->formpanel.detailGridField
 
 从表显示合计栏配置说明
 
+- 2018-11-6 08:39:18
+
+放大镜配置说明
+
 
 

+ 66 - 67
frontend/saas-web/app/Application.scss

@@ -1,76 +1,75 @@
-html, body {
-    height: 100%;
-    margin: 0;
-  }
-  
-  body.launching {
+html,
+body {
+  height: 100%;
+  margin: 0;
+}
+
+body.launching {
+  @include background-size(cover);
+  background-color: $auth-background-color;
+  background-image: $auth-background-image;
+  background-position: center;
+
+  &::before {
+    @include animation(rotate-animation 1s linear infinite);
+    @include transform-origin(50% 50%);
     @include background-size(cover);
-    background-color: $auth-background-color;
-    background-image: $auth-background-image;
+    background-image: url(get-resource-path('images/loading.png'));
     background-position: center;
-  
-    &::before {
-        @include animation(rotate-animation 1s linear infinite);
-        @include transform-origin(50% 50%);
-        @include background-size(cover);
-        background-image: url(get-resource-path('images/loading.png'));
-        background-position: center;
-        content: '';
-        position: absolute;
-        margin-top: -15px;
-        margin-left: -15px;
-        top: 50%;
-        left: 50%;
-        width: 41px;
-        height: 41px;
-    }
+    content: '';
+    position: absolute;
+    margin-top: -15px;
+    margin-left: -15px;
+    top: 50%;
+    left: 50%;
+    width: 41px;
+    height: 41px;
   }
+}
 
 @mixin btn-border($background-color) {
-    background-color: $background-color;
-    border-color: $background-color !important;
-  
-    .x-btn-inner-default-toolbar-small {
-      color: $lightest-color;
+  background-color: $background-color;
+  border-color: $background-color !important;
+
+  .x-btn-inner-default-toolbar-small {
+    color: $lightest-color;
+  }
+
+  &:hover {
+    background-color: transparent;
+
+    .x-btn-inner-default-toolbar-small,
+    .x-btn-inner-default-small {
+      color: $background-color;
     }
-  
-    &:hover {
-      background-color: transparent;
-  
-      .x-btn-inner-default-toolbar-small,
-      .x-btn-inner-default-small {
-        color: $background-color;
-      }
-  
-      .x-btn-icon-el-default-small,
-      .x-btn-icon-el-default-toolbar-small {
-        color: $background-color;
-      }
+
+    .x-btn-icon-el-default-small,
+    .x-btn-icon-el-default-toolbar-small {
+      color: $background-color;
     }
   }
-  
-  .x-menu-header {
-    z-index: 0 !important;
-  }
-  
-  .x-css-shadow{
-    box-shadow: none !important;
-  }
-  
-  .shadow {
-    @include box-shadow(rgba(0,0,0,0.2) 0 1px 2px);
-  }
-  
-  .x-fa {
-    display: inline-block;
-  }
-  
-  .alignRight {
-    float: right;
-  }
-  
-  .boldFont {
-    font-weight: bold;
-  }
+}
+
+.x-menu-header {
+  z-index: 0 !important;
+}
+
+.x-css-shadow {
+  box-shadow: none !important;
+}
+
+.shadow {
+  @include box-shadow(rgba(0, 0, 0, 0.2) 0 1px 2px);
+}
+
+.x-fa {
+  display: inline-block;
+}
+
+.alignRight {
+  float: right;
+}
 
-  
+.boldFont {
+  font-weight: bold;
+}

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

+ 1 - 1
frontend/saas-web/app/model/sale/ProdIODetail.js

@@ -14,7 +14,7 @@ Ext.define('saas.model.sale.ProdIODetail', {
         { name: 'pd_prodcode', type: 'string' },
         { name: 'pd_unit', type: 'string' },
         { name: 'pd_inqty', type: 'int' },
-        { name: 'pd_outqty', type: 'int' },
+        { name: 'pd_outqty', type: 'float' },
         { name: 'pd_orderprice', type: 'float' },
         { name: 'pd_sendprice', type: 'float' },
         { name: 'pd_price', type: 'float' },

+ 2 - 1
frontend/saas-web/app/model/sale/Saledetail.js

@@ -12,7 +12,8 @@ Ext.define('saas.model.sale.Saledetail', {
         { name: 'sd_total', type: 'float' },
         { name: 'sd_delivery', type: 'date' },
         { name: 'sd_taxtotal', type: 'float' },
-        { name: 'sd_pucode', type: 'string' }
+        { name: 'sd_pucode', type: 'string' },
+        { name: 'sd_text1', type: 'string' }
     ],
     //一对一映射
     associations: [{ type: 'hasOne', model: 'saas.model.document.Product', associationKey: 'productDTO'}]

+ 20 - 7
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'
                                     });
@@ -100,6 +110,9 @@ Ext.define('saas.util.FormUtil', {
                                 
                                 var editor = c.editor;
                                 if(editor) {
+                                    Ext.applyIf(editor, {
+                                        selectOnFocus: true
+                                    });
                                     if(editor.xtype == 'numberfield') {
                                         Ext.applyIf(editor, {
                                             hideTrigger: true, // 隐藏trigger

+ 2 - 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',
@@ -67,6 +68,7 @@ Ext.define('saas.view.core.form.FormPanel', {
             text: '保存',
             handler: 'onSave',
             bind: {
+                hidden: '{'+ me._statusCodeField + ' == "' + me.auditTexts.auditCode + '"}',
                 // disabled: '{!base.valid || '+ me._statusCodeField + ' == "AUDITED" || ' + me._statusCodeField + ' == "OPEN"}'
                 disabled: '{!base.valid || '+ me._statusCodeField + ' == "' + me.auditTexts.auditCode + '"}'
             }

+ 12 - 0
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -165,6 +165,18 @@ Ext.define('saas.view.core.form.FormPanelController', {
         })
         .catch(function(res) {
             console.error(res);
+            if(res.data) {
+                var id = localJson.data.id;
+                var code = localJson.data.code;
+                
+                form.initId = id;
+
+                var newId = form.xtype + '-' + id;
+                var newTitle = form._title + '(' + code + ')';
+
+                refreshTabTitle(newId, newTitle);
+                form.FormUtil.loadData(form);
+            }
             showToast('审核失败: ' + res.message);
         });
     },

+ 22 - 0
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -212,6 +212,28 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
         me.callParent(arguments);
     },
     listeners: {
+        boxready: function(grid, width, height, eOpts) {
+            var store = grid.getStore(),
+            dockedItems = grid.getDockedItems(),
+            toolbar = dockedItems[0],
+            header = dockedItems[1],
+            pagingtoolbar = dockedItems[2];
+
+            var gridEl = grid.el.dom,
+            gridHeight = gridEl.getBoundingClientRect().height,
+            toolbarEl = toolbar.el.dom,
+            toolbarHeight = toolbarEl.getBoundingClientRect().height,
+            headerEl = header.el.dom,
+            headerHeight = headerEl.getBoundingClientRect().height,
+            pagingtoolbarEl = pagingtoolbar.el.dom,
+            pagingtoolbarHeight = pagingtoolbarEl.getBoundingClientRect().height;
+
+            var gridBodyHeight = gridHeight - toolbarHeight - headerHeight - pagingtoolbarHeight;
+
+            var pageSize = Math.floor(gridBodyHeight / 32);
+
+            store.setPageSize(pageSize);
+        },
         itemClick: function(tableView, record, item, index, e, eOpts) {
             if(e.target.parentElement.classList.contains('x-querygrid-code-column')) {
                 var grid = tableView.up('grid'),

+ 7 - 0
frontend/saas-web/app/view/core/query/QueryPanel.js

@@ -110,6 +110,13 @@ Ext.define('saas.view.core.query.QueryPanel', {
             }
         });
 
+        if(columns[columns.length - 1].flex != 1) {
+            columns.push({
+                flex: 1,
+                allowBlank: true
+            });
+        }
+
         me.queryGridConfig['columns']=columns;
         Ext.apply(queryGrid,me.queryGridConfig);
     },

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

@@ -33,7 +33,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') {
@@ -48,7 +48,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') {

+ 34 - 20
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -36,15 +36,11 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         name: 'id',
         fieldLabel: 'id'
     }, {
-        xtype: 'hidden',
+        xtype: 'textfield',
         name: 'pb_kind',
         fieldLabel: '单据类型',
         defaultValue: '付款单'
-    }, {
-        xtype: "datefield",
-        name: "pb_date",
-        fieldLabel: "日期"
-    }, {
+    },  {
         xtype: 'hidden',
         name: 'pb_vendid',
         fieldLabel: '供应商ID'
@@ -56,28 +52,41 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         xtype: "dbfindtrigger",
         name: "pb_vendname",
         fieldLabel: "供应商名称"
-    }, {
-        xtype: 'textfield',
+    },{
+        xtype:"numberfield",
+        name:"ve_leftamount",
+        fieldLabel:"总欠款",
+        ignore:true
+    },{
+        xtype: "datefield",
+        name: "pb_date",
+        fieldLabel: "日期"
+    },{
+      xtype:"textfield",
+      name:"pb_code",
+      fieldLabel:"单号"
+    },{
+        xtype: 'hidden',
         name: 'pb_manname',
         fieldLabel: '收款人'
     }, {
-        xtype: 'numberfield',
+        xtype: 'hidden',
         name: 'pb_pdamount',
         fieldLabel: '付款金额'
     }, {
-        xtype: "numberfield",
+        xtype: "hidden",
         name: "pb_pbdamount",
         fieldLabel: "本次核销金额"
     }, {
-        xtype: "numberfield",
+        xtype: "hidden",
         name: "pb_preamount",
         fieldLabel: "本次预付款"
     }, {
-        xtype: 'numberfield',
+        xtype: 'hidden',
         name: 'pb_discounts',
         fieldLabel: '整单折扣'
     }, {
-        xtype: 'numberfield',
+        xtype: 'hidden',
         name: 'pb_havebalance',
         fieldLabel: '已核销金额'
     }, {
@@ -92,6 +101,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         }, {
             text: '期间',
             dataIndex: 'pd_ym',
+            hidden:true
             // editor: {
             //     xtype: 'hidden',
                 // xtype: 'textfield,
@@ -107,7 +117,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         //     text: '结算账户编号',
         //     dataIndex: 'paybalancedet'
         // }, {
-            text: '结算账户',
+            text: '资金账户',
             dataIndex: 'pd_bankname'
         }, {
             text: "付款金额",
@@ -148,7 +158,11 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         storeModel: 'saas.model.money.PayBalance2',
         detnoColumn: 'pbd_detno',
         deleteDetailUrl: '/api/money/paybalance/deleteDetail2/',
-        columns: [{
+        ltar: {
+          xtype:'button',
+          text:'选择源单',
+          name:'chooseSource'
+        },columns: [{
             text: 'ID',
             dataIndex: 'id',
             hidden: true
@@ -165,11 +179,11 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
                 xtype:'hidden'
             }
         }, {
-            text: '源单号',
+            text: '源单号',
             dataIndex: 'pbd_slcode'
-        // }, {
-        //     text: "单据类型",
-        //     dataIndex: "pbd_slkind",
+        }, {
+            text: "业务类型",
+            dataIndex: "pbd_slkind",
         }, {
             text: "单据日期",
             dataIndex: "pbd_sldate",
@@ -260,7 +274,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             dataIndex: 'pbd_remark',
             width: 250,
             editor:{
-                xtype: 'textfield'
+                xtype: 'hidden'
             }
         }]
     }, {

+ 9 - 1
frontend/saas-web/app/view/money/payBalance/FormPanelController.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
             'dbfindtrigger[name=pb_vendname]':{
                 beforerender: function (f) {
                     Ext.apply(f, {
-                        dataUrl: '/api/document/vendor/list',
+                        dataUrl: 'api/document/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
                         dbfinds: [{
@@ -25,6 +25,9 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                         }, {
                             field: 've_name',
                             width: 100
+                        },{
+                            field:'ve_leftamount',
+                            width: 100
                         }],
                         defaultCondition: "ve_statuscode='OPEN'",
                         dbSearchFields:[{
@@ -65,6 +68,11 @@ Ext.define('saas.view.money.payBalance.FormPanelController', {
                             "dataIndex": "ve_taxrate",
                             "width": 100
                         }, {
+                            "text":"应付款金额",
+                            "flex":1,
+                            "dataIndex":"ve_leftamount",
+                            "width":100
+                        },{
                             "text": "承付天数",
                             "flex": 1,
                             "dataIndex": "ve_promisedays",

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

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

@@ -111,7 +111,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         addTitle: '物料资料',
                         //放大镜赋值设置
                         dbfinds:[{
-                            from:'id',to:'pd_prodid'                          
+                            from:'id',to:'pd_prodid',ignore:true                          
                         },{
                             from:'pr_code',to:'pd_prodcode'                          
                         },{
@@ -128,6 +128,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         defaultCondition: "pr_statuscode='OPEN'",
                         dbSearchFields:[{
                             emptyText:'输入物料编号、名称或规格',
+                            width: 200,
                             xtype : "textfield", 
                             name : "search", 
                             allowBlank : true, 
@@ -142,29 +143,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 +189,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         },{
                             "text": "供应商",
                             "dataIndex": "pr_vendname",
+                            "width": 100,
                         },{
                             "text": "最小包装",
                             "dataIndex": "pr_zxbzs",
@@ -192,7 +198,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, 

+ 9 - 50
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js

@@ -22,7 +22,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         addTitle: '供应商资料',
                         defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'id',to:'pi_vendid'
+                            from:'id',to:'pi_vendid',ignore:true
                         },{
                             from:'ve_code',to:'pi_vendcode'
                         },{
@@ -105,7 +105,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         dbfinds:[{
-                            from:'id',to:'pd_prodid'                          
+                            from:'id',to:'pd_prodid',ignore:true                          
                         },{
                             from:'pr_code',to:'pd_prodcode'                          
                         },{
@@ -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
                         }]                    
-                    }) ;   
-
+                    });   
                 }
             },
 
@@ -255,7 +214,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         addTitle: '仓库资料',
                         defaultCondition:"wh_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'id',to:'pd_whid'                          
+                            from:'id',to:'pd_whid',ignore:true                          
                         },{
                             from:'wh_code',to:'pd_whcode'                          
                         },{

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

+ 8 - 48
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -21,7 +21,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         addTitle: '供应商资料',
                         defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'ve_id',to:'pi_vendid'
+                            from:'ve_id',to:'pi_vendid',ignore:true
                         },{
                             from:'ve_code',to:'pi_vendcode'
                         },{
@@ -104,7 +104,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         dbfinds:[{
-                            from:'id',to:'pd_prodid'                          
+                            from:'id',to:'pd_prodid',ignore:true                          
                         },{
                             from:'pr_code',to:'pd_prodcode'                          
                         },{
@@ -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
                         }]
                     }) ;   
 
@@ -254,7 +214,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         addTitle: '仓库资料',
                         defaultCondition:"wh_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'id',to:'pd_whid'                          
+                            from:'id',to:'pd_whid',ignore:true                          
                         },{
                             from:'wh_code',to:'pd_whcode'                          
                         },{

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

+ 5 - 4
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('.');
@@ -237,10 +239,9 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 ignore:true
             },{
                 text : "备注", 
-                dataIndex : "sd_remark",
+                dataIndex : "sd_text1",
                 width : 250, 
                 items : null,
-                ignore:true,
                 editor : {
                     xtype : "textfield"
                 },

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

+ 5 - 3
frontend/saas-web/app/view/sale/saleOut/FormPanel.js

@@ -26,7 +26,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
 
     toolBtns: [{
         xtype: 'button',
-        text: '转销售退',
+        text: '转销售退',
         handler: 'turnProdIn',
         bind: {
             hidden: '{pi_statuscode!="AUDITED"}'
@@ -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('.');

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

@@ -91,43 +91,77 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         defaultCondition:"pr_statuscode='OPEN'",
                         //窗口字段设置
                         dbSearchFields:[{
-                            emptyText:'输入仓库编号或名称',
+                            emptyText:'输入物料编号、名称或规格',
                             xtype : "textfield", 
-                            name : "name", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "(upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
-                            }
+                            columnWidth : 0.25
                         }],
                         //窗口列设置
                         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,
                         }]
                     }) ;   
 
@@ -156,43 +190,77 @@ Ext.define('saas.view.stock.make.FormPanelController', {
                         defaultCondition:"pr_statuscode='OPEN'",
                         //窗口字段设置
                         dbSearchFields:[{
-                            emptyText:'输入仓库编号或名称',
+                            emptyText:'输入物料编号、名称或规格',
                             xtype : "textfield", 
-                            name : "name", 
+                            name : "search", 
+                            width: 200,
+                            getCondition: function(v) {
+                                return "(upper(pr_spec) like '%" + v.toUpperCase()+"%' or upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
+                            },
                             allowBlank : true, 
-                            columnWidth : 0.25,
-                            getCondition:function(v){
-                                return "(upper(pr_code) like '%"+v.toUpperCase()+"%' or upper(pr_detail) like '%"+v.toUpperCase()+"%')";
-                            }
+                            columnWidth : 0.25
                         }],
                         //窗口列设置
                         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, 

+ 11 - 53
frontend/saas-web/app/view/stock/otherIn/FormPanelController.js

@@ -15,7 +15,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         addTitle: '供应商资料',
                         defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'id',to:'pi_vendid'
+                            from:'id',to:'pi_vendid',ignore:true
                         },{
                             from:'ve_code',to:'pi_vendcode'
                         },{
@@ -99,7 +99,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         // dataUrl:'http://localhost:9480/customer/list',
                         dbfinds: [{
                             from: 'id',
-                            to: 'pi_custid'
+                            to: 'pi_custid',ignore:true
                         }, {
                             from: 'cu_code',
                             to: 'pi_custcode'
@@ -173,7 +173,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         addTitle: '物料资料',
                         dbfinds: [{
                             from: 'id',
-                            to: 'pd_prodid'
+                            to: 'pd_prodid',ignore:true
                         }, {
                             from: 'pr_code',
                             to: 'pd_prodcode'
@@ -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
                         }]
                     });
 
@@ -330,7 +288,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         defaultCondition:"wh_statuscode='OPEN'",
                         dbfinds: [{
                             from: 'id',
-                            to: 'pd_whid'
+                            to: 'pd_whid',ignore:true
                         }, {
                             from: 'wh_code',
                             to: 'pd_whcode'

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

+ 11 - 53
frontend/saas-web/app/view/stock/otherOut/FormPanelController.js

@@ -15,7 +15,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         addTitle: '供应商资料',
                         defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'id',to:'pi_vendid'
+                            from:'id',to:'pi_vendid',ignore:true
                         },{
                             from:'ve_code',to:'pi_vendcode'
                         },{
@@ -98,7 +98,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         dataUrl:'/api/document/customer/list',
                         // dataUrl:'http://localhost:9480/customer/list',
                         dbfinds:[{
-                            from:'id',to:'pi_custid'
+                            from:'id',to:'pi_custid',ignore:true
                         },{
                             from:'cu_code',to:'pi_custcode'
                         },{
@@ -167,7 +167,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         dbfinds:[{
-                            from:'id',to:'pd_prodid'                          
+                            from:'id',to:'pd_prodid',ignore:true                          
                         },{
                             from:'pr_code',to:'pd_prodcode'                          
                         },{
@@ -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
                         }]
                     }) ;   
 
@@ -318,7 +276,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         addTitle: '仓库资料',
                         defaultCondition:"wh_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'id',to:'pd_whid'                          
+                            from:'id',to:'pd_whid',ignore:true                          
                         },{
                             from:'wh_code',to:'pd_whcode'                          
                         },{

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