chenw 7 лет назад
Родитель
Сommit
94d3f6eef2
95 измененных файлов с 1880 добавлено и 824 удалено
  1. 1 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  2. 1 1
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/RecbalanceServiceImpl.java
  3. 1 1
      applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml
  4. 52 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/config/WebConfig.java
  5. 1 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java
  6. 3 3
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java
  7. 2 0
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseDetail.java
  8. 5 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/ProdInOutServiceImpl.java
  9. 6 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  10. 15 3
      applications/purchase/purchase-server/src/main/resources/mapper/PurchasedetailMapper.xml
  11. 4 0
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/SaleDTO.java
  12. 1 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/SaleController.java
  13. 1 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/Sale.java
  14. 20 8
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/ProdInOutServiceImpl.java
  15. 6 2
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  16. 11 11
      applications/sale/sale-server/src/main/resources/mapper/ProdIODetailMapper.xml
  17. 1 0
      applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml
  18. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutDTO.java
  19. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutListDTO.java
  20. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java
  21. 1 1
      applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOutList.java
  22. 52 0
      applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/config/WebConfig.java
  23. 2 2
      base-servers/account/account-api/src/main/java/com/usoftchina/saas/account/api/AccountApi.java
  24. 10 2
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/AccountDTO.java
  25. 2 1
      base-servers/account/account-server/src/main/resources/application.yml
  26. 12 0
      base-servers/account/account-server/src/main/resources/config/application-docker-dev.yml
  27. 6 0
      base-servers/account/account-server/src/main/resources/logback-spring.xml
  28. 13 2
      base-servers/auth/auth-api/src/main/java/com/usoftchina/saas/auth/api/AuthApi.java
  29. 0 23
      base-servers/auth/auth-api/src/main/java/com/usoftchina/saas/auth/api/TokenApi.java
  30. 10 7
      base-servers/auth/auth-api/src/main/java/com/usoftchina/saas/auth/cache/TokenCache.java
  31. 4 0
      base-servers/auth/auth-dto/pom.xml
  32. 47 0
      base-servers/auth/auth-dto/src/main/java/com/usoftchina/saas/auth/dto/AuthDTO.java
  33. 9 0
      base-servers/auth/auth-server/pom.xml
  34. 58 5
      base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java
  35. 29 7
      base-servers/auth/auth-server/src/main/resources/application.yml
  36. BIN
      base-servers/auth/auth-server/src/main/resources/auth/pub.key
  37. 12 0
      base-servers/auth/auth-server/src/main/resources/config/application-docker-dev.yml
  38. 10 0
      base-servers/auth/auth-server/src/main/resources/config/application-docker.yml
  39. 6 0
      base-servers/auth/auth-server/src/main/resources/logback-spring.xml
  40. 0 4
      base-servers/auth/auth-server/src/main/resources/mapper/AccountMapper.xml
  41. 0 4
      base-servers/auth/auth-server/src/main/resources/mapper/AccountRoleMapper.xml
  42. 0 4
      base-servers/auth/auth-server/src/main/resources/mapper/ResourcesMapper.xml
  43. 0 4
      base-servers/auth/auth-server/src/main/resources/mapper/RoleMapper.xml
  44. 0 4
      base-servers/auth/auth-server/src/main/resources/mapper/RoleResourceMapper.xml
  45. 38 0
      base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/config/AuthFilter.java
  46. 2 3
      base-servers/gateway-server/src/main/resources/application.yml
  47. 1 0
      framework/core/src/main/java/com/usoftchina/saas/exception/ExceptionCode.java
  48. 43 0
      frontend/saas-web/app/model/purchase/prodindetail.js
  49. 23 5
      frontend/saas-web/app/util/FormUtil.js
  50. 21 5
      frontend/saas-web/app/view/core/form/FormPanel.js
  51. 2 44
      frontend/saas-web/app/view/core/form/FormPanelController.js
  52. 5 0
      frontend/saas-web/app/view/core/form/RemoteCombo.js
  53. 43 0
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  54. 1 0
      frontend/saas-web/app/view/core/view/BoundListAdd.js
  55. 5 0
      frontend/saas-web/app/view/document/bom/BasePanel.js
  56. 2 2
      frontend/saas-web/app/view/document/bom/FormPanel.js
  57. 13 28
      frontend/saas-web/app/view/document/customer/BasePanel.js
  58. 10 17
      frontend/saas-web/app/view/document/customer/FormPanel.js
  59. 15 0
      frontend/saas-web/app/view/document/kind/ChildForm.js
  60. 14 1
      frontend/saas-web/app/view/document/kind/Kind.js
  61. 100 9
      frontend/saas-web/app/view/document/kind/KindModel.js
  62. 25 0
      frontend/saas-web/app/view/document/other/ProductUnit.js
  63. 8 29
      frontend/saas-web/app/view/document/product/BasePanel.js
  64. 7 3
      frontend/saas-web/app/view/document/product/FormController.js
  65. 24 49
      frontend/saas-web/app/view/document/product/FormPanel.js
  66. 12 27
      frontend/saas-web/app/view/document/vendor/BasePanel.js
  67. 8 16
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  68. 19 13
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  69. 32 6
      frontend/saas-web/app/view/money/fundtransfer/FormPanelController.js
  70. 1 1
      frontend/saas-web/app/view/money/fundtransfer/QueryPanel.js
  71. 6 19
      frontend/saas-web/app/view/money/othreceipts/FormPanel.js
  72. 80 28
      frontend/saas-web/app/view/money/othreceipts/FormPanelController.js
  73. 80 28
      frontend/saas-web/app/view/money/othreceipts/QueryPanelController.js
  74. 6 19
      frontend/saas-web/app/view/money/othspendings/FormPanel.js
  75. 49 18
      frontend/saas-web/app/view/money/othspendings/FormPanelController.js
  76. 1 1
      frontend/saas-web/app/view/money/othspendings/QueryPanel.js
  77. 45 14
      frontend/saas-web/app/view/money/othspendings/QueryPanelController.js
  78. 3 0
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  79. 9 3
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  80. 26 12
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  81. 6 0
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  82. 2 3
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  83. 146 67
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  84. 74 37
      frontend/saas-web/app/view/sale/sale/QueryPanelController.js
  85. 20 8
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  86. 112 44
      frontend/saas-web/app/view/sale/saleIn/FormPanelController.js
  87. 6 4
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  88. 71 36
      frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js
  89. 4 1
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  90. 132 68
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  91. 4 3
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  92. 104 37
      frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js
  93. 0 6
      frontend/saas-web/ext/build/ext-all-rtl-debug.js
  94. 2 1
      frontend/saas-web/resources/json/navigation.json
  95. 1 1
      pom.xml

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

@@ -154,6 +154,7 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
                 detail2.setCompanyId(companyId);
                 detail2.setCreatorId(userId);
                 detail2.setCreateTime(new Date());
+                insertDetail2.add(detail2);
             }
             //插入从表
             if (insertDetail2.size()>0) {

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

@@ -70,7 +70,7 @@ public class RecbalanceServiceImpl implements RecbalanceService {
             recbalancedet1.setRd_rbid(Math.toIntExact(rbId));
             recbalancedet1.setCompanyId(BaseContextHolder.getCompanyId());
             if (recbalancedet1.getId() > 0 ){
-                recbalancedetMapper.updateByPrimaryKey(recbalancedet1);
+                recbalancedetMapper.updateByPrimaryKeySelective(recbalancedet1);
             }else {
                 recbalancedetMapper.insertSelective(recbalancedet1);
             }

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

@@ -31,7 +31,7 @@
     select 
     <include refid="Base_Column_List" />
     from recbalancedetail
-    where rd_rbid = #{id,jdbcType=INTEGER}
+    where rbd_rbid = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteItem" parameterType="java.lang.Integer" >
     delete from recbalancedetail

+ 52 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/config/WebConfig.java

@@ -0,0 +1,52 @@
+package com.usoftchina.saas.purchase.config;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.converter.StringHttpMessageConverter;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+
+import java.nio.charset.Charset;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+
+/**
+ * @author: guq
+ * @create: 2018-10-30 11:20
+ **/
+
+@Configuration
+public class WebConfig extends WebMvcConfigurationSupport{
+    @Bean
+    public HttpMessageConverter<String> responseBodyConverter() {
+        StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
+        return converter;
+    }
+
+    @Bean
+    public MappingJackson2HttpMessageConverter MappingJacksonHttpMessageConverter(){
+        MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
+        ObjectMapper objectMapper = new ObjectMapper();
+        objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
+        converter.setObjectMapper(objectMapper);
+        return converter;
+    }
+
+    @Override
+    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
+        super.configureMessageConverters(converters);
+        converters.add(responseBodyConverter());
+        converters.add(MappingJacksonHttpMessageConverter());
+    }
+
+    @Override
+    public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
+        configurer.favorPathExtension(false);
+    }
+
+}
+

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

@@ -198,8 +198,7 @@ public class ProdInOutController {
 
     @PostMapping("/turnProdOut/{id}")
     public Result turnProdin(@PathVariable("id") Long id){
-        prodInOutService.turnProdOut(id);
-        return Result.success();
+        return prodInOutService.turnProdOut(id);
     }
 
 

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

@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
  * @author yingp
  * @date 2018/10/9
  */
+@CrossOrigin
 @RestController
 @RequestMapping("/purchase")
 public class PurchaseController {
@@ -154,14 +155,13 @@ public class PurchaseController {
 
     @PostMapping("/open/{id}")
     public Result openPurchase(@PathVariable(value = "id") long id){
-        purchaseService.openPurchase(id);
+         purchaseService.openPurchase(id);
         return Result.success();
     }
 
     @PostMapping("/turnProdin/{id}")
     public Result turnProdin(@PathVariable("id") Long id){
-        purchaseService.turnProdin(id);
-        return Result.success();
+        return purchaseService.turnProdin(id);
     }
 
 }

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

@@ -28,6 +28,8 @@ public class PurchaseDetail extends CommonBaseEntity implements Serializable {
 
     private Double pd_total;
 
+    private Double pd_taxrate;
+
     private Double pd_taxtotal;
 
     private Double pd_acceptqty;

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

@@ -414,7 +414,11 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                  prodIODetailMapper.updateByPrimaryKeySelective(sourcePid);
              }
          }
-        return Result.success();
+        DocBaseDTO baseDTO = new DocBaseDTO();
+        baseDTO.setId(pi_id);
+        baseDTO.setCode(piInoutno);
+        baseDTO.setName("采购验退单");
+        return Result.success(baseDTO);
     }
 
     private DocBaseDTO singleClose(Long id) {

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

@@ -404,9 +404,14 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         //更新主表入库状态
         purchase.setPu_acceptstatus("已入库");
         purchase.setPu_acceptstatuscode("TURNIN");
+
+        DocBaseDTO baseDTO = new DocBaseDTO();
+        baseDTO.setId(pi_id);
+        baseDTO.setCode(piInoutno);
+        baseDTO.setName("采购验收单");
         //更新存在字段
         int affect = getMapper().updateByPrimaryKeySelective(purchase);
-        return Result.success();
+        return Result.success(baseDTO);
     }
 
     private void singleAudit(Long id) {

+ 15 - 3
applications/purchase/purchase-server/src/main/resources/mapper/PurchasedetailMapper.xml

@@ -12,6 +12,7 @@
     <result column="PD_QTY" property="pd_qty" jdbcType="DOUBLE" />
     <result column="PD_PRICE" property="pd_price" jdbcType="DOUBLE" />
     <result column="PD_TOTAL" property="pd_total" jdbcType="DOUBLE" />
+    <result column="PD_TAXRATE" property="pd_taxrate" jdbcType="DOUBLE" />
     <result column="PD_TAXTOTAL" property="pd_taxtotal" jdbcType="DOUBLE" />
     <result column="PD_ACCEPTQTY" property="pd_acceptqty" jdbcType="DOUBLE" />
     <result column="PD_DELIVERY" property="pd_delivery" jdbcType="DOUBLE" />
@@ -60,7 +61,7 @@
   </resultMap>
   <sql id="Base_Column_List" >
     PD_ID, PD_PUID, PD_CODE, PD_DETNO, PD_PRODID, PD_PRODCODE, PD_UNIT, PD_QTY, PD_PRICE,
-    PD_TOTAL, PD_TAXTOTAL, PD_ACCEPTQTY, PD_DELIVERY, PD_SALECODE, PD_SALEDETNO, PD_SDID,
+    PD_TOTAL, PD_TAXRATE,PD_TAXTOTAL, PD_ACCEPTQTY, PD_DELIVERY, PD_SALECODE, PD_SALEDETNO, PD_SDID,
     companyId, updaterId, updateTime, pd_text1, pd_text2, pd_text3, pd_text4, pd_text5,
     pd_yqty
   </sql>
@@ -124,6 +125,9 @@
       <if test="pdTotal != null" >
         PD_TOTAL,
       </if>
+      <if test="PD_TAXRATE != null" >
+        PD_TAXRATE,
+      </if>
       <if test="pdTaxtotal != null" >
         PD_TAXTOTAL,
       </if>
@@ -198,6 +202,9 @@
       <if test="pdTotal != null" >
         #{pdTotal,jdbcType=DOUBLE},
       </if>
+      <if test="PD_TAXRATE != null" >
+        #{PD_TAXRATE,jdbcType=DOUBLE},
+      </if>
       <if test="pdTaxtotal != null" >
         #{pdTaxtotal,jdbcType=DOUBLE},
       </if>
@@ -275,6 +282,10 @@
       <if test="pd_total != null" >
         PD_TOTAL = #{pd_total,jdbcType=DOUBLE},
       </if>
+      <if test="pd_taxrate != null" >
+        PD_TAXRATE = #{pd_taxrate,jdbcType=DOUBLE},
+      </if>
+
       <if test="pd_taxtotal != null" >
         PD_TAXTOTAL = #{pd_taxtotal,jdbcType=DOUBLE},
       </if>
@@ -355,7 +366,7 @@
     insert into purchasedetail ( PD_PUID, PD_CODE,
     PD_DETNO, PD_PRODID, PD_PRODCODE,
     PD_UNIT, PD_QTY, PD_PRICE,
-    PD_TOTAL, PD_TAXTOTAL, PD_ACCEPTQTY,
+    PD_TOTAL,PD_TAXRATE, PD_TAXTOTAL, PD_ACCEPTQTY,
     PD_DELIVERY, PD_SALECODE, PD_SALEDETNO,
     PD_SDID, companyId, updaterId,
     updateTime, pd_text1, pd_text2,
@@ -367,7 +378,7 @@
       #{item.pd_puid,jdbcType=INTEGER}, #{item.pd_code,jdbcType=VARCHAR},
       #{item.pd_detno,jdbcType=INTEGER}, #{item.pd_prodid,jdbcType=INTEGER}, #{item.pd_prodcode,jdbcType=VARCHAR},
       #{item.pd_unit,jdbcType=VARCHAR}, #{item.pd_qty,jdbcType=DOUBLE}, #{item.pd_price,jdbcType=DOUBLE},
-      #{item.pd_total,jdbcType=DOUBLE}, #{item.pd_taxtotal,jdbcType=DOUBLE}, #{item.pd_acceptqty,jdbcType=DOUBLE},
+      #{item.pd_total,jdbcType=DOUBLE},#{item.pd_taxrate,jdbcType=DOUBLE}, #{item.pd_taxtotal,jdbcType=DOUBLE}, #{item.pd_acceptqty,jdbcType=DOUBLE},
       #{item.pd_delivery,jdbcType=DOUBLE}, #{item.pd_salecode,jdbcType=VARCHAR}, #{item.pd_saledetno,jdbcType=INTEGER},
       #{item.pd_sdid,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER}, #{item.updaterId,jdbcType=INTEGER},
       #{item.updateTime,jdbcType=TIMESTAMP}, #{item.pd_text1,jdbcType=VARCHAR}, #{item.pd_text2,jdbcType=VARCHAR},
@@ -388,6 +399,7 @@
       PD_QTY = #{item.pd_qty},
       PD_PRICE = #{item.pd_price},
       PD_TOTAL = #{item.pd_total},
+      PD_TAXRATE = #{item.pd_taxrate}
       PD_TAXTOTAL = #{item.pd_taxtotal},
       PD_ACCEPTQTY = #{item.pd_acceptqty},
       PD_DELIVERY = #{item.pd_delivery},

+ 4 - 0
applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/SaleDTO.java

@@ -24,6 +24,8 @@ public class SaleDTO extends CommonBaseDTO{
 
     private String sa_totalupper;
 
+    private String sa_toplace;
+
     private String sa_status;
 
     private String sa_statuscode;
@@ -42,6 +44,8 @@ public class SaleDTO extends CommonBaseDTO{
 
     private Date sa_recorddate;
 
+    private String sa_remark;
+
     private String sa_text1;
 
     private String sa_text2;

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

@@ -165,6 +165,6 @@ public class SaleController {
 
     @GetMapping("/test")
     public String test() {
-        return "配置构建success";
+        return "配置构建success-1";
     }
 }

+ 1 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/Sale.java

@@ -39,7 +39,7 @@ public class Sale extends CommonBaseEntity{
 
     private String sa_printstatuscode;
 
-    private Integer sa_recorderid;
+    private Long sa_recorderid;
 
     private String sa_recorder;
 

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

@@ -91,12 +91,16 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         prodInOut.setCompanyId(companyId);
         prodInOut.setCreatorId(userId);
         prodInOut.setCreateTime(new Date());
-        prodInOut.setPi_date(new Date());
+        prodInOut.setPi_recordmanid(userId);
+        prodInOut.setPi_recorddate(new Date());
+        prodInOut.setPi_recordman("TESTADMIN");
 
+        if(prodInOut.getPi_date() == null){
+            prodInOut.setPi_date(new Date());
+        }
         //编号获取
         pi_inoutno = pushMaxnubmer(prodInOut);
         prodInOut.setPi_inoutno(pi_inoutno);
-
         prodInOut.setPi_class(main.getPi_class());
         prodInOut.setPi_said(main.getPi_said());
         prodInOut.setPi_sacode(main.getPi_sacode());
@@ -112,6 +116,8 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 detail.setPd_piid(pi_id);
                 detail.setPd_inoutno(pi_inoutno);
                 detail.setPd_piclass(pi_class);
+                detail.setCompanyId(companyId);
+                detail.setCreateTime(new Date());
                 detail.setPd_yqty(0.0);
                 insertDetails.add(detail);
             }
@@ -394,10 +400,17 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         String piInoutno =
                 //BillCodeSeq.SALEIN.getCaller() + Math.abs(Math.random()*100);
                 maxnumberService.getMaxnumber(BillCodeSeq.SALEIN.getCaller(),true).getData();
+        //设置公司id
+        targetPi.setCompanyId(sourcePi.getCompanyId());
+        targetPi.setCreateTime(new Date());
+        targetPi.setCreatorId(BaseContextHolder.getUserId());
+        targetPi.setPi_recordmanid(BaseContextHolder.getUserId());
+        targetPi.setPi_recorddate(new Date());
+        targetPi.setPi_recordman("TESTADMIN");
+
         targetPi.setPi_inoutno(piInoutno);
         targetPi.setPi_class(BillCodeSeq.SALEIN.getName());
         targetPi.setPi_date(new Date());
-        targetPi.setPi_recorddate(new Date());
         targetPi.setPi_status(Status.UNAUDITED.getDisplay());
         targetPi.setPi_statuscode(Status.UNAUDITED.name());
         //客户信息
@@ -406,9 +419,6 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
         targetPi.setPi_custname(sourcePi.getPi_custname());
         targetPi.setPi_said(sourcePi.getPi_said());
         targetPi.setPi_sacode(sourcePi.getPi_sacode());
-
-        //设置公司id
-        targetPi.setCompanyId(sourcePi.getCompanyId());
         //保存数据
         getMapper().insertSelective(targetPi);
         //插入销售退货单从表
@@ -419,6 +429,9 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
             pdOutqty = sourcePid.getPd_outqty()==null?0.0:sourcePid.getPd_outqty();
             pdYqty = sourcePid.getPd_yqty()==null?0.0:sourcePid.getPd_yqty();
             if(pdOutqty-pdYqty>0){
+                //公司id
+                targetPid.setCompanyId(sourcePid.getCompanyId());
+                targetPid.setCreateTime(new Date());
                 targetPid.setPd_piid(pi_id);
                 targetPid.setPd_inoutno(piInoutno);
                 targetPid.setPd_piclass(BillCodeSeq.SALEIN.getName());
@@ -436,8 +449,7 @@ public class ProdInOutServiceImpl extends CommonBaseServiceImpl<ProdInOutMapper,
                 targetPid.setPd_unit(sourcePid.getPd_unit());
                 targetPid.setPd_ioid(sourcePid.getId());
                 targetPid.setPd_status(0);
-                //公司id
-                targetPid.setCompanyId(sourcePid.getCompanyId());
+
                 //本次转单数
                 targetPid.setPd_inqty(pdOutqty-pdYqty);
                 prodIODetailMapper.insertSelective(targetPid);

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

@@ -114,6 +114,8 @@ public class SaleServiceImpl implements SaleService{
         sale.setCompanyId(companyId);
         sale.setCreatorId(userId);
         sale.setCreateTime(new Date());
+        sale.setSa_recorderid(userId);
+        sale.setSa_recorder("test");
 
         //编号校验
         sa_code = pushMaxnubmer(sa_code, sa_id);
@@ -129,6 +131,7 @@ public class SaleServiceImpl implements SaleService{
                 SaleDetail detail = BeanMapper.map(item, SaleDetail.class);
                 detail.setSd_said(sa_id);
                 detail.setSd_code(sa_code);
+                detail.setSd_yqty(0.0);
                 insertDetails.add(detail);
             }
             //插入从表
@@ -406,6 +409,7 @@ public class SaleServiceImpl implements SaleService{
         Integer count = 0;
         double pdQty = 0;
         double pdYqty = 0;
+        Long companyId = BaseContextHolder.getCompanyId();
         Sale sale = saleMapper.selectByPrimaryKey(id);
         List<SaleDetail> details = saledetailMapper.selectByFK(id);
         if (null == sale || StringUtils.isEmpty(sale.getSa_code()) || details.size() == 0) {
@@ -450,7 +454,7 @@ public class SaleServiceImpl implements SaleService{
         prodInOut.setPi_said(sale.getId());
         prodInOut.setPi_sacode(sale.getSa_code());
         //设置公司id
-        prodInOut.setCompanyId(sale.getCompanyId());
+        prodInOut.setCompanyId(companyId);
 
         prodInOutMapper.insertSelective(prodInOut);
         //插入出货单从表
@@ -470,7 +474,7 @@ public class SaleServiceImpl implements SaleService{
             prodIODetail.setPd_prodid(saleDetail.getSd_prodid());
             prodIODetail.setPd_prodcode(saleDetail.getSd_prodcode());
             //公司id
-            prodIODetail.setCompanyId(saleDetail.getCompanyId());
+            prodIODetail.setCompanyId(companyId);
             //本次转单数
             prodIODetail.setPd_inqty((saleDetail.getSd_qty()-saleDetail.getSd_yqty()));
             prodIODetailMapper.insertSelective(prodIODetail);

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

@@ -41,7 +41,7 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
-    <association property="productDTO" javaType="com.usoftchina.saas.document.entities.Product">
+    <association property="productDTO" javaType="com.usoftchina.saas.document.dto.ProductDTO">
       <id column="pr_id" property="id"/>
       <result column="pr_code" property="pr_code"/>
       <result column="pr_detail" property="pr_detail"/>
@@ -739,16 +739,16 @@
 
   <update id="updateSaleOutYqty" parameterType="long">
 update prodiodetail
-  set a.pd_yqty =ifnull((select  b.pd_inqty  from  (select pi_said,sum(pd_inqty) pd_inqty from  prodiodetail left join prodinout on pd_piid = pi_id where pd_piclass='销售退货单'
-and pi_said=#{id}  GROUP BY pd_ioid) b where ifnull(b.pd_ioid ,0)= a.pd_id ),0)
+  set a.pd_yqty =IFNULL((select  b.pd_inqty  from  (select pi_said,sum(pd_inqty) pd_inqty from  prodiodetail left join prodinout on pd_piid = pi_id where pd_piclass='销售退货单'
+and pi_said=#{id}  GROUP BY pd_ioid) b where IFNULL(b.pd_ioid ,0)= a.pd_id ),0)
 where a.pd_piid = (select pi_id from prodinout where pi_said=#{id} and pi_class='销售出货单')
   </update>
   <update id="updateSaleYqty" parameterType="long">
     update saledtail
-    set a.sd_yqty =ifnull((
+    set a.sd_yqty =IFNULL((
     select  b.pd_ounqty  from  (select pi_said,sum(pd_outqty) pd_outqty
       from  prodiodetail left join prodinout on pd_piid = pi_id where pd_piclass='销售出货单'
-      and pi_said=#{id}  GROUP BY pi_said) b where ifnull(b.pd_ioid ,0)= a.pd_id
+      and pi_said=#{id}  GROUP BY pi_said) b where IFNULL(b.pd_ioid ,0)= a.pd_id
       ),0)
     where a.sd_said = #{id}
   </update>
@@ -760,16 +760,16 @@ where a.pd_piid = (select pi_id from prodinout where pi_said=#{id} and pi_class=
 
   <update id="updatePDSaleIN" parameterType="long">
    update prodiodetail set
-   pd_total=ifnull(pd_inqty,0)*ifnull(pd_orderprice,0),
-   pd_netprice = ifnull(pd_sendprice,0)/(1+ifnull(pd_taxrate,0)/100),
-   pd_nettotal = (ifnull(pd_sendprice,0)/(1+ifnull(pd_taxrate,0)/100))*ifnull(pd_inqty)
+   pd_total=IFNULL(pd_inqty,0)*IFNULL(pd_orderprice,0),
+   pd_netprice = IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),
+   pd_nettotal = (IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_inqty,0)
    where pd_piid=#{id}
   </update>
   <update id="updatePDSaleOut" parameterType="long">
     update prodiodetail set
-    pd_total=ifnull(pd_outqty,0)*ifnull(pd_orderprice,0),
-    pd_netprice = ifnull(pd_sendprice,0)/(1+ifnull(pd_taxrate,0)/100),
-    pd_nettotal = (ifnull(pd_sendprice,0)/(1+ifnull(pd_taxrate,0)/100))*ifnull(pd_outqty)
+    pd_total=IFNULL(pd_outqty,0)*IFNULL(pd_orderprice,0),
+    pd_netprice = IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100),
+    pd_nettotal = (IFNULL(pd_sendprice,0)/(1+IFNULL(pd_taxrate,0)/100))*IFNULL(pd_outqty,0)
     where pd_piid=#{id}
   </update>
 </mapper>

+ 1 - 0
applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -34,6 +34,7 @@
     <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
     <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
     <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
+    <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdInOut">
     <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />

+ 1 - 1
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutDTO.java

@@ -43,7 +43,7 @@ public class ProdInOutDTO extends CommonBaseDTO implements Serializable {
 
     private Double pi_total;
 
-    private Integer pi_recordmanid;
+    private Long pi_recordmanid;
 
     private String pi_recordman;
 

+ 1 - 1
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/dto/ProdInOutListDTO.java

@@ -41,7 +41,7 @@ public class ProdInOutListDTO extends CommonBaseEntity implements Serializable {
 
     private Double pi_total;
 
-    private Integer pi_recordmanid;
+    private Long pi_recordmanid;
 
     private String pi_recordman;
 

+ 1 - 1
applications/storage/storage-dto/src/main/java/com/usoftchina/saas/storage/po/ProdInOut.java

@@ -37,7 +37,7 @@ public class ProdInOut extends CommonBaseEntity implements Serializable {
 
     private Double pi_total;
 
-    private Integer pi_recordmanid;
+    private Long pi_recordmanid;
 
     private String pi_recordman;
 

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

@@ -40,7 +40,7 @@ public class ProdInOutList extends CommonBaseEntity{
 
     private Double pi_total;
 
-    private Integer pi_recordmanid;
+    private Long pi_recordmanid;
 
     private String pi_recordman;
 

+ 52 - 0
applications/storage/storage-server/src/main/java/com/usoftchina/saas/storage/config/WebConfig.java

@@ -0,0 +1,52 @@
+package com.usoftchina.saas.storage.config;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.converter.StringHttpMessageConverter;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+
+import java.nio.charset.Charset;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+
+/**
+ * @author: guq
+ * @create: 2018-10-30 11:20
+ **/
+
+@Configuration
+public class WebConfig extends WebMvcConfigurationSupport{
+    @Bean
+    public HttpMessageConverter<String> responseBodyConverter() {
+        StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
+        return converter;
+    }
+
+    @Bean
+    public MappingJackson2HttpMessageConverter MappingJacksonHttpMessageConverter(){
+        MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
+        ObjectMapper objectMapper = new ObjectMapper();
+        objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
+        converter.setObjectMapper(objectMapper);
+        return converter;
+    }
+
+    @Override
+    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
+        super.configureMessageConverters(converters);
+        converters.add(responseBodyConverter());
+        converters.add(MappingJacksonHttpMessageConverter());
+    }
+
+    @Override
+    public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
+        configurer.favorPathExtension(false);
+    }
+
+}
+

+ 2 - 2
base-servers/account/account-api/src/main/java/com/usoftchina/saas/account/api/AccountApi.java

@@ -19,7 +19,7 @@ public interface AccountApi {
      * @param password 明文密码
      * @return
      */
-    @GetMapping(value = "/pwd/check")
+    @GetMapping(value = "/account/pwd/check")
     Result<AccountDTO> validByUsernameAndPwd(@RequestParam(value = "username") String username, @RequestParam(value = "password") String password);
 
     /**
@@ -28,6 +28,6 @@ public interface AccountApi {
      * @param username
      * @return
      */
-    @GetMapping
+    @GetMapping(value = "/account/read")
     Result<AccountDTO> getAccount(@RequestParam(value = "username") String username);
 }

+ 10 - 2
base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/AccountDTO.java

@@ -29,13 +29,12 @@ public class AccountDTO implements Serializable {
      * 所绑定的角色(按绑定的公司ID分组成Map)
      */
     private Map<Long, List<RoleBaseDTO>> rolesMap;
-
     /**
      * 所拥有的资源
      *
      * @return
      */
-
+    private Map<Long, List<UrlResourceDTO>> resourcesMap;
 
     public Long getId() {
         return id;
@@ -101,6 +100,14 @@ public class AccountDTO implements Serializable {
         this.rolesMap = rolesMap;
     }
 
+    public Map<Long, List<UrlResourceDTO>> getResourcesMap() {
+        return resourcesMap;
+    }
+
+    public void setResourcesMap(Map<Long, List<UrlResourceDTO>> resourcesMap) {
+        this.resourcesMap = resourcesMap;
+    }
+
     @Override
     public String toString() {
         return "AccountDTO{" +
@@ -112,6 +119,7 @@ public class AccountDTO implements Serializable {
                 ", type=" + type +
                 ", companies=" + companies +
                 ", rolesMap=" + rolesMap +
+                ", resourcesMap=" + resourcesMap +
                 '}';
     }
 }

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

@@ -40,13 +40,14 @@ eureka:
     leaseRenewalIntervalInSeconds: 10
     health-check-url-path: /actuator/health
     status-page-url-path: /actuator/info
+    prefer-ip-address: true
     metadata-map:
       user.name: ${spring.security.user.name}
       user.password: ${spring.security.user.password}
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
 server:
   port: 8580
   tomcat:

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

@@ -0,0 +1,12 @@
+eureka:
+  instance:
+    hostname: saas-account-server-dev
+    prefer-ip-address: false
+  client:
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@saas-eureka-server-dev:8510/eureka/
+spring:
+  rabbitmq:
+    virtual-host: dev
+server:
+  port: 8590

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

@@ -103,4 +103,10 @@
         </root>
     </springProfile>
 
+    <springProfile name="docker-dev">
+        <root level="INFO">
+            <appender-ref ref="CONSOLE_APPENDER"/>
+        </root>
+    </springProfile>
+
 </configuration>

+ 13 - 2
base-servers/auth/auth-api/src/main/java/com/usoftchina/saas/auth/api/AuthApi.java

@@ -1,8 +1,10 @@
 package com.usoftchina.saas.auth.api;
 
+import com.usoftchina.saas.auth.dto.AuthDTO;
 import com.usoftchina.saas.auth.dto.TokenDTO;
 import com.usoftchina.saas.base.Result;
 import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
@@ -13,12 +15,21 @@ import org.springframework.web.bind.annotation.RequestParam;
 @FeignClient(name = "auth-server")
 public interface AuthApi {
     /**
-     * 登录认证获取token
+     * 登录认证获取token、公司列表
      *
      * @param username
      * @param password
      * @return
      */
     @PostMapping(value = "/api/auth")
-    Result<TokenDTO> authorize(@RequestParam(value = "username") String username, @RequestParam(value = "password") String password);
+    Result<AuthDTO> authorize(@RequestParam(value = "username") String username, @RequestParam(value = "password") String password);
+
+    /**
+     * 切换公司
+     *
+     * @param companyId
+     * @return
+     */
+    @GetMapping(value = "/api/auth/switch/company")
+    Result<TokenDTO> switchCompany(@RequestParam(value = "companyId") String companyId);
 }

+ 0 - 23
base-servers/auth/auth-api/src/main/java/com/usoftchina/saas/auth/api/TokenApi.java

@@ -1,23 +0,0 @@
-package com.usoftchina.saas.auth.api;
-
-import com.usoftchina.saas.auth.dto.TokenDTO;
-import com.usoftchina.saas.base.Result;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-/**
- * @author yingp
- * @date 2018/9/30
- */
-@FeignClient(name = "auth-server")
-public interface TokenApi {
-    /**
-     * 登录获取token
-     *
-     * @param userName
-     * @return
-     */
-    @PostMapping(value = "/client/login")
-    Result<TokenDTO> login(@RequestParam(value = "userName") String userName);
-}

+ 10 - 7
base-servers/auth/auth-api/src/main/java/com/usoftchina/saas/auth/cache/TokenCache.java

@@ -1,6 +1,6 @@
 package com.usoftchina.saas.auth.cache;
 
-import com.usoftchina.saas.auth.api.TokenApi;
+import com.usoftchina.saas.auth.api.AuthApi;
 import com.usoftchina.saas.cache.RedisHashCache;
 import com.usoftchina.saas.context.SpringContextHolder;
 import org.springframework.data.redis.core.RedisTemplate;
@@ -15,16 +15,19 @@ public class TokenCache extends RedisHashCache<String, String, String> {
 
     private final String account;
 
-    private final TokenApi tokenApi;
+    private final String password;
 
-    private TokenCache(String account) {
+    private final AuthApi authApi;
+
+    private TokenCache(String account, String password) {
         super(() -> SpringContextHolder.getBean(RedisTemplate.class));
         this.account = account;
-        this.tokenApi = SpringContextHolder.getBean(TokenApi.class);
+        this.password = password;
+        this.authApi = SpringContextHolder.getBean(AuthApi.class);
     }
 
-    public static TokenCache of(String account) {
-        return new TokenCache(account);
+    public static TokenCache of(String account, String password) {
+        return new TokenCache(account, password);
     }
 
     @Override
@@ -39,6 +42,6 @@ public class TokenCache extends RedisHashCache<String, String, String> {
 
     @Override
     protected Supplier<String> getSupplier() {
-        return () -> tokenApi.login(account).getData().getToken();
+        return () -> authApi.authorize(account, password).getData().getToken().getToken();
     }
 }

+ 4 - 0
base-servers/auth/auth-dto/pom.xml

@@ -13,6 +13,10 @@
     <description>authentication data transfer object</description>
 
     <dependencies>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>account-dto</artifactId>
+        </dependency>
         <dependency>
             <groupId>io.springfox</groupId>
             <artifactId>springfox-swagger2</artifactId>

+ 47 - 0
base-servers/auth/auth-dto/src/main/java/com/usoftchina/saas/auth/dto/AuthDTO.java

@@ -0,0 +1,47 @@
+package com.usoftchina.saas.auth.dto;
+
+import com.usoftchina.saas.account.dto.CompanyBaseDTO;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author yingp
+ * @date 2018/10/26
+ */
+public class AuthDTO implements Serializable{
+    private TokenDTO token;
+    private List<CompanyBaseDTO> companies;
+
+    public AuthDTO() {
+    }
+
+    public AuthDTO(TokenDTO token, List<CompanyBaseDTO> companies) {
+        this.token = token;
+        this.companies = companies;
+    }
+
+    public TokenDTO getToken() {
+        return token;
+    }
+
+    public void setToken(TokenDTO token) {
+        this.token = token;
+    }
+
+    public List<CompanyBaseDTO> getCompanies() {
+        return companies;
+    }
+
+    public void setCompanies(List<CompanyBaseDTO> companies) {
+        this.companies = companies;
+    }
+
+    @Override
+    public String toString() {
+        return "AuthDTO{" +
+                "token=" + token +
+                ", companies=" + companies +
+                '}';
+    }
+}

+ 9 - 0
base-servers/auth/auth-server/pom.xml

@@ -48,6 +48,15 @@
             <artifactId>springfox-swagger2</artifactId>
         </dependency>
 
+        <!-- sleuth -->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-zipkin</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.amqp</groupId>
+            <artifactId>spring-rabbit</artifactId>
+        </dependency>
         <dependency>
             <groupId>net.logstash.logback</groupId>
             <artifactId>logstash-logback-encoder</artifactId>

+ 58 - 5
base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java

@@ -5,27 +5,38 @@ import com.usoftchina.saas.account.dto.AccountDTO;
 import com.usoftchina.saas.auth.common.jwt.JwtHelper;
 import com.usoftchina.saas.auth.common.jwt.JwtInfo;
 import com.usoftchina.saas.auth.common.jwt.TokenVO;
+import com.usoftchina.saas.auth.dto.AuthDTO;
 import com.usoftchina.saas.auth.dto.TokenDTO;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.exception.ExceptionCode;
 import com.usoftchina.saas.utils.BeanMapper;
+import com.usoftchina.saas.utils.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
 
+import javax.servlet.http.HttpServletRequest;
+
 /**
  * @author yingp
  * @date 2018/10/2
  */
 @RestController
-@RequestMapping(path = "/api/auth")
+@RequestMapping
 public class AuthController {
 
     @Autowired
     private AccountApi accountApi;
 
+    @Value("${auth.public-key}")
+    private String publicKeyPath;
+
     @Value("${auth.private-key}")
     private String privateKeyPath;
 
+    @Value("${auth.header:Authorization}")
+    private String authHeader;
+
     @Value("${auth.expire:18000}")
     private int expire;
 
@@ -36,17 +47,59 @@ public class AuthController {
      * @param password
      * @return
      */
-    @PostMapping
-    public Result<TokenDTO> authorize(@RequestParam(value = "username") String username, @RequestParam(value = "password") String password) {
+    @PostMapping("/authorize")
+    public Result<AuthDTO> authorize(@RequestParam String username, @RequestParam String password) {
         Result<AccountDTO> result = accountApi.validByUsernameAndPwd(username, password);
         if (result.isSuccess()) {
             AccountDTO accountDTO = result.getData();
+            Long companyId = null;
+            if (!CollectionUtils.isEmpty(accountDTO.getCompanies())) {
+                companyId = accountDTO.getCompanies().get(0).getId();
+            }
             // TODO
-            JwtInfo info = new JwtInfo(null, null, accountDTO.getId(), accountDTO.getUsername());
+            String appId = "trade-app";
+
+            JwtInfo info = new JwtInfo(appId, companyId, accountDTO.getId(), accountDTO.getUsername());
             TokenVO tokenVO = JwtHelper.generateToken(info, privateKeyPath, expire);
             TokenDTO tokenDTO = BeanMapper.map(tokenVO, TokenDTO.class);
-            return Result.success(tokenDTO);
+            return Result.success(new AuthDTO(tokenDTO, accountDTO.getCompanies()));
         }
         return Result.error(result.getCode(), result.getMessage());
     }
+
+    /**
+     * 切换公司
+     *
+     * @param request
+     * @param companyId
+     * @return
+     */
+    @GetMapping("/switch/company")
+    public Result<TokenDTO> switchCompany(HttpServletRequest request, @RequestParam Long companyId) {
+        String token = request.getHeader(authHeader);
+        JwtInfo infoFromToken = JwtHelper.getInfoFromToken(token, publicKeyPath);
+        if (isCompanyAvailable(infoFromToken, companyId)) {
+            JwtInfo info = new JwtInfo(infoFromToken.getAppId(), companyId, infoFromToken.getUserId(),
+                    infoFromToken.getUserName());
+            TokenVO tokenVO = JwtHelper.generateToken(info, privateKeyPath, expire);
+            return Result.success(BeanMapper.map(tokenVO, TokenDTO.class));
+        }
+        return Result.error(ExceptionCode.COMPANY_NOT_BIND);
+    }
+
+    /**
+     * 指定公司是否可用:
+     * 公司是否存在 + 是否已绑定
+     *
+     * @param infoFromToken
+     * @param companyId
+     * @return
+     */
+    private boolean isCompanyAvailable(JwtInfo infoFromToken, Long companyId) {
+        Result<AccountDTO> accountDTO = accountApi.getAccount(infoFromToken.getUserName());
+        if (!CollectionUtils.isEmpty(accountDTO.getData().getCompanies())) {
+            return accountDTO.getData().getCompanies().stream().anyMatch(cmp -> cmp.getId().equals(companyId));
+        }
+        return false;
+    }
 }

+ 29 - 7
base-servers/auth/auth-server/src/main/resources/application.yml

@@ -7,12 +7,32 @@ spring:
     user:
       name: admin
       password: select111***
+  rabbitmq:
+    host: 192.168.0.176
+    port: 5672
+    virtual-host: dev
+    username: saas
+    password: select123***
+  zipkin:
+    sender:
+      type: rabbit
+    locator:
+      discovery:
+        enabled: true
+  sleuth:
+    sampler:
+      probability: 1.0
   datasource:
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://192.168.253.12:3306/saas_auth?characterEncoding=utf-8&useSSL=false
+    username: root
+    password: select111***
     hikari:
-      driver-class-name: com.mysql.cj.jdbc.Driver
-      jdbc-url: jdbc:mysql://192.168.253.12:3306/saas_auth?characterEncoding=utf-8&useSSL=false
-      username: root
-      password: select111***
+      minimum-idle: 5
+      maximum-pool-size: 50
+      idle-timeout: 30000
+      max-lifetime: 1800000
+      connection-timeout: 30000
   messages:
     basename: i18n/messages
 eureka:
@@ -20,15 +40,16 @@ eureka:
     leaseRenewalIntervalInSeconds: 10
     health-check-url-path: /actuator/health
     status-page-url-path: /actuator/info
+    prefer-ip-address: true
     metadata-map:
       user.name: ${spring.security.user.name}
       user.password: ${spring.security.user.password}
   client:
     registryFetchIntervalSeconds: 5
     serviceUrl:
-      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@192.168.0.181:8510/eureka/
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/
 server:
-  port: 8580
+  port: 8600
   tomcat:
     uri-encoding: UTF-8
 info:
@@ -41,4 +62,5 @@ mybatis:
   type-aliases-package: com.usoftchina.saas.auth.po
   mapper-locations: classpath:mapper/*.xml
 auth:
-  private-key: auth/pri.key
+  private-key: auth/pri.key
+  public-key: auth/pub.key

BIN
base-servers/auth/auth-server/src/main/resources/auth/pub.key


+ 12 - 0
base-servers/auth/auth-server/src/main/resources/config/application-docker-dev.yml

@@ -0,0 +1,12 @@
+eureka:
+  instance:
+    hostname: saas-auth-server-dev
+    prefer-ip-address: false
+  client:
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@saas-eureka-server-dev:8510/eureka/
+spring:
+  rabbitmq:
+    virtual-host: dev
+server:
+  port: 8610

+ 10 - 0
base-servers/auth/auth-server/src/main/resources/config/application-docker.yml

@@ -0,0 +1,10 @@
+eureka:
+  instance:
+    hostname: saas-auth-server
+    prefer-ip-address: false
+  client:
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@saas-eureka-server:8500/eureka/
+spring:
+  rabbitmq:
+    virtual-host: docker

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

@@ -103,4 +103,10 @@
         </root>
     </springProfile>
 
+    <springProfile name="docker-dev">
+        <root level="INFO">
+            <appender-ref ref="CONSOLE_APPENDER"/>
+        </root>
+    </springProfile>
+
 </configuration>

+ 0 - 4
base-servers/auth/auth-server/src/main/resources/mapper/AccountMapper.xml

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.usoftchina.saas.auth.mapper.AccountMapper">
-</mapper>

+ 0 - 4
base-servers/auth/auth-server/src/main/resources/mapper/AccountRoleMapper.xml

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.usoftchina.saas.auth.mapper.AccountRoleMapper">
-</mapper>

+ 0 - 4
base-servers/auth/auth-server/src/main/resources/mapper/ResourcesMapper.xml

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.usoftchina.saas.auth.mapper.ResourcesMapper">
-</mapper>

+ 0 - 4
base-servers/auth/auth-server/src/main/resources/mapper/RoleMapper.xml

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.usoftchina.saas.auth.mapper.RoleMapper">
-</mapper>

+ 0 - 4
base-servers/auth/auth-server/src/main/resources/mapper/RoleResourceMapper.xml

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.usoftchina.saas.auth.mapper.RoleResourceMapper">
-</mapper>

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

@@ -1,23 +1,61 @@
 package com.usoftchina.saas.gateway.config;
 
+import com.usoftchina.saas.auth.common.jwt.JwtHelper;
+import com.usoftchina.saas.auth.common.jwt.JwtInfo;
+import com.usoftchina.saas.exception.BizException;
+import com.usoftchina.saas.exception.ExceptionCode;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.cloud.gateway.filter.GatewayFilterChain;
 import org.springframework.cloud.gateway.filter.GlobalFilter;
+import org.springframework.context.annotation.Configuration;
 import org.springframework.core.Ordered;
+import org.springframework.http.server.reactive.ServerHttpRequest;
 import org.springframework.web.server.ServerWebExchange;
 import reactor.core.publisher.Mono;
 
+import java.util.List;
+
 /**
  * 全局过滤器鉴权
  *
  * @author yingp
  * @date 2018/10/13
  */
+@Configuration
+@EnableConfigurationProperties(AuthConfig.class)
 public class AuthFilter implements GlobalFilter, Ordered {
+
+    @Autowired
+    private AuthConfig authConfig;
+
     @Override
     public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
+        if (!isIgnore(exchange.getRequest())) {
+            // 鉴别身份信息
+//            JwtInfo jwt = getJwtInfoFromHeader(exchange.getRequest());
+            // 鉴别角色权限
+        }
         return chain.filter(exchange);
     }
 
+    private boolean isIgnore(ServerHttpRequest request) {
+        String path = request.getPath().value();
+        return authConfig.getIgnores().stream().anyMatch(ignore -> ignore.equals(path));
+    }
+
+    private JwtInfo getJwtInfoFromHeader(ServerHttpRequest request) {
+        if (!request.getHeaders().containsKey(authConfig.getAuthHeader())) {
+            throw new BizException(ExceptionCode.JWT_ILLEGAL_ARGUMENT);
+        }
+        List<String> headers = request.getHeaders().get(authConfig.getAuthHeader());
+        if (headers.isEmpty()) {
+            throw new BizException(ExceptionCode.JWT_ILLEGAL_ARGUMENT);
+        }
+        String token = headers.get(0).trim();
+        return JwtHelper.getInfoFromToken(token, authConfig.getPublicKey());
+    }
+
     @Override
     public int getOrder() {
         return -100;

+ 2 - 3
base-servers/gateway-server/src/main/resources/application.yml

@@ -153,8 +153,7 @@ info:
   spring-boot-version: '@spring.boot.version@'
   spring-cloud-version: '@spring.cloud.version@'
 auth:
+  auth-header: Authorization
   public-key: auth/pub.key
   ignores:
-    - /api/auth
-    # 忽略全部
-    - /
+    - /api/auth/authorize

+ 1 - 0
framework/core/src/main/java/com/usoftchina/saas/exception/ExceptionCode.java

@@ -26,6 +26,7 @@ public enum ExceptionCode implements BaseExceptionCode {
     COMPANY_CODE_EXIST(52001, "公司商业登记证号已注册"),
     COMPANY_DOMAIN_EXIST(52002, "域名已存在"),
     COMPANY_NOT_EXIST(52003, "公司不存在"),
+    COMPANY_NOT_BIND(52004, "未绑定该公司"),
     USER_NAME_EXIST(53000, "用户名已注册"),
     USER_MOBILE_EXIST(53001, "手机号已注册"),
     USER_EMAIL_EXIST(53002, "邮箱已注册"),

+ 43 - 0
frontend/saas-web/app/model/purchase/prodindetail.js

@@ -0,0 +1,43 @@
+Ext.define('saas.model.purchase.prodindetail', {
+    extend: 'saas.model.Base',
+
+    fields: [
+
+        { name: 'id', type: 'int' },
+        { name: 'pd_piid', type: 'int' },
+        { name: 'pd_inoutno', type: 'string' },
+        { name: 'pd_piclass', type: 'string' },
+        { name: 'pd_pdno', type: 'int' },
+        { name: 'pd_ordercode', type: 'string' },
+        { name: 'pd_orderdetno', type: 'int' },
+        { 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_orderprice', type: 'float' },
+        { name: 'pd_sendprice', type: 'float' },
+        { name: 'pd_price', type: 'float' },
+        { name: 'pd_total', type: 'float' },
+        { name: 'pd_taxrate', type: 'float' },
+        { name: 'pd_qty', type: 'int' },
+        { name: 'pd_netprice', type: 'float' },
+        { name: 'pd_nettotal', type: 'float' },
+        { name: 'pd_whid', type: 'int' },
+        { name: 'pd_whcode', type: 'string' },
+        { name: 'pd_whname', type: 'string' },
+        { name: 'pd_inwhid', type: 'int' },
+        { name: 'pd_inwhcode', type: 'string' },
+        { name: 'pd_inwhname', type: 'string' },
+        { name: 'pd_orderid', type: 'int' },
+        { name: 'pd_sdid', type: 'int' },
+        { name: 'pd_status', type: 'string' },
+        { name: 'pd_ym', type: 'int' },
+        { name: 'pd_yqty', type: 'int' },
+        { name: 'pd_remark', type: 'string' },
+        { name: 'pd_ioid', type: 'int' },
+        { name: 'pd_delivery', type: 'date' }
+    ],
+    //一对一映射
+    associations: [{ type: 'hasOne', model: 'saas.model.document.ProductDTO', associationKey: 'ProductDTO'}]
+});

+ 23 - 5
frontend/saas-web/app/util/FormUtil.js

@@ -35,6 +35,11 @@ Ext.define('saas.util.FormUtil', {
                         Ext.apply(item, cusItem);
                     });
                     Ext.Array.each(items, function(item) {
+
+                        if(item.xtype == 'datefield') {
+                            item.format = 'Y-m-d H:i:s'
+                        }
+
                         if(item.xtype == 'numberfield') {
                             Ext.applyIf(item, {
                                 hideTrigger: true, // 隐藏trigger
@@ -62,6 +67,7 @@ Ext.define('saas.util.FormUtil', {
 
                             Ext.Array.each(columns, function(c) {
 
+
                                 // 不可锁定
                                 Ext.applyIf(c, {
                                     lockable: false
@@ -71,13 +77,25 @@ Ext.define('saas.util.FormUtil', {
                                 if(c.logic=='necessaryField'){
                                     c.cls = 'x-grid-necessary';
                                 }
+
+                                if(c.xtype == 'datecolumn') {
+                                    Ext.apply(c.xtype, {
+                                        format: 'Y-m-d H:i:s'
+                                    });
+                                }
                                 
                                 var editor = c.editor;
-                                if(editor && editor.xtype == 'numberfield') {
-                                    Ext.applyIf(editor, {
-                                        hideTrigger: true, // 隐藏trigger
-                                        mouseWheelEnabled: false // 取消滚轮事件
-                                    });
+                                if(editor) {
+                                    if(editor.xtype == 'numberfield') {
+                                        Ext.applyIf(editor, {
+                                            hideTrigger: true, // 隐藏trigger
+                                            mouseWheelEnabled: false // 取消滚轮事件
+                                        });
+                                    }else if(editor.xtype == 'datefield') {
+                                        Ext.apply(editor, {
+                                            format: 'Y-m-d H:i:s'
+                                        });
+                                    }
                                 }
                             });
 

+ 21 - 5
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -169,10 +169,15 @@ Ext.define('saas.view.core.form.FormPanel', {
             allData = viewModel.getData(),
             bindFields = allData.base.bindFields,
             detailCount = me.detailCount,
-            formData = {};
+            formData = {},
+            detailGrids = me.query('detailGridField');
 
         Ext.Array.each(bindFields, function(field) {
-            formData[field] = allData[field];
+            var v = allData[field];
+            if(Ext.isDate(v)) {
+                v = Ext.Date.format(v, 'Y-m-d H:i:s');
+            }
+            formData[field] = v;
         });
 
         var data = {
@@ -180,10 +185,21 @@ Ext.define('saas.view.core.form.FormPanel', {
         };
 
         for (var i = 0; i < detailCount; i++) {
-            var detail = allData['detail' + i],
-                store = detail.detailStore;
+            var g = detailGrids[i];
+            var gridDirtyData = g.getDirtyData();
+            var modelDetail = allData['detail' + i];
+            var detailBindFields = modelDetail.detailBindFields;
+
+            Ext.Array.each(gridDirtyData, function(d) {
+                for(k in d) {
+                    if(!Ext.Array.contains(detailBindFields, k)) {
+                        delete d[k];
+                    }
+                }
+            });
+            
 
-            data['detail' + i] = store.getData().items;
+            data['detail' + i] = gridDirtyData;
         }
 
         return data;

+ 2 - 44
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -77,28 +77,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
         };
 
         for(var i = 0; i < detailCount; i++) {
-            var detailData = formData['detail' + i];
-            var modelDetail = modelData['detail' + i];
-            var dirtyGridData = [];
-            var detailBindFields = modelDetail.detailBindFields;
-
-            Ext.Array.each(detailData, function(item){
-                var d = Object.assign({}, item.data),
-                dirty = item.dirty;
-
-                if(dirty){
-                    if((typeof d.id) != "number" && d.id.indexOf('-')>-1){
-                        d.id = 0;
-                    }
-                    for(k in d) {
-                        if(!Ext.Array.contains(detailBindFields, k)) {
-                            delete d[k];
-                        }
-                    }
-                    dirtyGridData.push(d);
-                }
-            });
-            params['items' + ( i + 1)] = dirtyGridData;
+            params['items' + ( i + 1)] = formData['detail' + i];
         }
 
         // 只有一个从表时从表字段改为items
@@ -147,28 +126,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
         };
 
         for(var i = 0; i < detailCount; i++) {
-            var detailData = formData['detail' + i];
-            var modelDetail = modelData['detail' + i];
-            var dirtyGridData = [];
-            var detailBindFields = modelDetail.detailBindFields;
-
-            Ext.Array.each(detailData, function(item){
-                var d = Object.assign({}, item.data),
-                dirty = item.dirty;
-
-                if(dirty){
-                    if((typeof d.id) != "number" && d.id.indexOf('-')>-1){
-                        d.id = 0;
-                    }
-                    for(k in d) {
-                        if(!Ext.Array.contains(detailBindFields, k)) {
-                            delete d[k];
-                        }
-                    }
-                    dirtyGridData.push(d);
-                }
-            });
-            params['items' + ( i + 1)] = dirtyGridData;
+            params['items' + ( i + 1)] = formData['detail' + i];
         }
 
         // 只有一个从表时从表字段改为items

+ 5 - 0
frontend/saas-web/app/view/core/form/RemoteCombo.js

@@ -4,6 +4,8 @@
 Ext.define('saas.view.core.form.RemoteCombo', {
     extend: 'Ext.form.field.ComboBox',
     alias: 'widget.remotecombo',
+    displayField: 'display',
+    valueField: 'value',
     queryMode: 'local',//只在组件加载的时候请求一次
     initComponent: function() {
         var me = this;
@@ -34,6 +36,9 @@ Ext.define('saas.view.core.form.RemoteCombo', {
         var me = this,
             picker,
             pickerCfg = Ext.apply({
+                maxHeight: 180,
+                minHeight: 0,
+                hiddenBtn:me.hiddenBtn,
                 xtype: 'boundlistadd',
                 id: me.id + '-picker',
                 pickerField: me,

+ 43 - 0
frontend/saas-web/app/view/core/form/field/DetailGridField.js

@@ -114,6 +114,12 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
                 '</div>';
             },
         };
+
+        Ext.Array.each(columns, function(c) {
+            Ext.applyIf(c, {
+                allowBlank: true
+            });
+        });
         if (detnoField) {
             Ext.apply(me, { columns: [indexColumn].concat(columns) });
         }
@@ -287,6 +293,43 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
                 typeof e.setDisabled == 'function' && e.setDisabled(!able);
             }
         });
+    },
+    isValid: function() {
+        var me = this,
+        columns = me.columns;
+
+        // 判断列必填
+        Ext.Array.each(columns, function(c) {
+            var allowBlank = c.allowBlank;
+            if(!allowBlank) {
+                
+            }
+        });
+    },
+
+    getDirtyData: function() {
+        var me = this,
+        store = me.getStore(),
+        allData = store.getData().items,
+        dirtyData = [];
+
+        Ext.Array.each(allData, function(item){
+            var d = Object.assign({}, item.data),
+            dirty = item.dirty;
+
+            if(dirty){
+                if((typeof d.id) != "number" && d.id.indexOf('-')>-1){
+                    d.id = 0;
+                }
+                for(k in d) {
+                    if(Ext.isDate(d[k])) {
+                        d[k] = Ext.Date.format(d[k], 'Y-m-d H:i:s');
+                    }
+                }
+                dirtyData.push(d);
+            }
+        });
+        return dirtyData;
     }
 
 });

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

@@ -255,6 +255,7 @@ Ext.define('saas.view.core.view.BoundListAdd', {
             id: me.id + '-toolbar',
             border: true,
             ownerCt: me,
+            hidden:me.hiddenBtn,
             items:[{
                 text:'新增',
                 handler:me.addHandler,

+ 5 - 0
frontend/saas-web/app/view/document/bom/BasePanel.js

@@ -10,6 +10,7 @@ Ext.define('saas.view.document.bom.BasePanel', {
     //字段属性
     _formXtype:'document-bom-formpanel',
     _title:'BOM资料',
+    _deleteUrl:'/api/document/bom/delete/',
     // _dataUrl:'/api/ducument/customer/list',
     _batchOpenUrl:'/api/document/bom/batchOpen',
     _batchCloseUrl:'/api/document/bom/batchClose',
@@ -57,4 +58,8 @@ Ext.define('saas.view.document.bom.BasePanel', {
         }]
     },
 
+    refresh:function(){
+        this.items.items[0].store.load()
+    }
+
 });

+ 2 - 2
frontend/saas-web/app/view/document/bom/FormPanel.js

@@ -150,13 +150,13 @@ Ext.define('saas.view.document.bom.FormPanel', {
                 bind: '{' + statusCodeField + '}',
                 get: function(value) {
                     viewModel.set(statusField, value == 'OPEN' ? '已开启' : '已关闭');
-                    return value == 'OPEN' ? '已关闭' : '已开启'
+                    return value == 'OPEN' ? '禁用' : '启用'
                 }
             };
             viewModel.setFormulas(o);
             viewModel.set(statusCodeField, "OPEN");
         }else {
-            viewModel.set('auditBtnText', "已关闭");
+            viewModel.set('auditBtnText', "禁用");
         }
     }
 });

+ 13 - 28
frontend/saas-web/app/view/document/customer/BasePanel.js

@@ -6,43 +6,19 @@ Ext.define('saas.view.document.customer.BasePanel', {
     viewModel: 'document-customer-basepanel',
 
     searchField:[{
+        editable:false,
+        hiddenBtn:true,
         xtype : "remotecombo", 
         storeUrl:'/api/document/customerkind/getCombo',
         name : "cu_type", 
         emptyText : "请选择客户类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
-        columnWidth : 0.25,
-        etc:{
-            customerkind:{
-                keyField:'id',
-                dataField:'ck_name',
-                reqUrl:'/api/document/customerkind/save',
-                delUrl:'/api/document/customerkind/delete'
-            }
-        },
-        addHandler:function(b){
-            var form = this.ownerCmp.ownerCt.ownerCt;
-            this.dialog = form.getController().getView().add({
-                xtype: 'document-kind-childwin',
-                bind: {
-                    title: '新增客户类型'
-                },
-                dataKind:'customerkind',
-                belong:this.ownerCmp.etc['customerkind'],
-                _parent:form,
-                record:null,
-                session: true
-            });
-            this.dialog.show();
-        }  
+        columnWidth : 0.25
     }],
 
     //字段属性
     _formXtype:'document-customer-formpanel',
     _title:'客户资料',
+    _deleteUrl:'/api/document/customer/delete/',
     // _dataUrl:'/api/ducument/customer/list',
     _batchOpenUrl:'/api/document/customer/batchOpen',
     _batchCloseUrl:'/api/document/customer/batchClose',
@@ -83,6 +59,11 @@ Ext.define('saas.view.document.customer.BasePanel', {
             dataIndex : "cu_uu", 
             width : 120.0, 
         }, 
+        {
+            text : "客户类型", 
+            dataIndex : "cu_type", 
+            width : 120.0, 
+        }, 
         {
             text : "默认客户地址", 
             dataIndex : "ca_address", 
@@ -95,4 +76,8 @@ Ext.define('saas.view.document.customer.BasePanel', {
         }]
     },
 
+    refresh:function(){
+        this.items.items[0].store.load()
+    }
+
 });

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

@@ -51,24 +51,16 @@ Ext.define('saas.view.document.customer.FormPanel', {
         allowBlank: true,
         columnWidth: 0.25
     },{
+        editable:false,
         xtype : "remotecombo", 
         storeUrl:'/api/document/customerkind/getCombo',
         name : "cu_type", 
         fieldLabel : "客户类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
+        allowBlank : false, 
         columnWidth : 0.25,
-        etc:{
-            customerkind:{
-                keyField:'id',
-                dataField:'ck_name',
-                reqUrl:'/api/document/customerkind/save',
-                delUrl:'/api/document/customerkind/delete'
-            }
-        },
+        hiddenBtn:false,//true 则会关闭新增按钮功能
         addHandler:function(b){
+            var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
@@ -76,8 +68,9 @@ Ext.define('saas.view.document.customer.FormPanel', {
                     title: '新增客户类型'
                 },
                 dataKind:'customerkind',
-                belong:this.ownerCmp.etc['customerkind'],
+                belong:document.etc['customerkind'],
                 _parent:form,
+                _combo:this.ownerCmp,
                 record:null,
                 session: true
             });
@@ -207,7 +200,7 @@ Ext.define('saas.view.document.customer.FormPanel', {
             {
                 editor : {
                     displayField : "display", 
-                    editable : true, 
+                    editable:false,
                     format : "", 
                     hideTrigger : false, 
                     maxLength : 100.0, 
@@ -288,8 +281,8 @@ Ext.define('saas.view.document.customer.FormPanel', {
             },
             {
                 editor : {
+                    editable:false,
                     displayField : "display", 
-                    editable : true, 
                     format : "", 
                     hideTrigger : false, 
                     maxLength : 100.0, 
@@ -348,13 +341,13 @@ Ext.define('saas.view.document.customer.FormPanel', {
                 bind: '{' + statusCodeField + '}',
                 get: function(value) {
                     viewModel.set(statusField, value == 'OPEN' ? '已开启' : '已关闭');
-                    return value == 'OPEN' ? '已关闭' : '已开启'
+                    return value == 'OPEN' ? '禁用' : '启用'
                 }
             };
             viewModel.setFormulas(o);
             viewModel.set(statusCodeField, "OPEN");
         }else {
-            viewModel.set('auditBtnText', "已关闭");
+            viewModel.set('auditBtnText', "禁用");
         }
     }
 });

+ 15 - 0
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -96,6 +96,17 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 allowBlank:false,
                 fieldLabel:'类型'
             }]
+        },  
+        productunit:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
+            },{
+                xtype:'textfield',
+                name:'pu_name',
+                allowBlank:false,
+                fieldLabel:'计量单位'
+            }]
         },
         inoutkind:{
             items:[{
@@ -178,6 +189,7 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
     onSave:function(){
         var belong = this.belong;
         var form=this.down('form');
+        var combo = this._combo;
         var params = {};
         var names = belong.columns.map(column => column.dataIndex);
         Ext.Array.each(names,function(name) {
@@ -203,6 +215,9 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 if(grid){
                     grid.store.load();
                 }
+                if(combo){
+                    combo.store.load();
+                }
                 form.ownerCt.close();
             }
         })

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

@@ -10,6 +10,9 @@ Ext.define('saas.view.document.kind.Kind', {
     viewModel: {
         type: 'document-kind'
     },
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
     defaultType:'',
     requires: [
         'Ext.button.Segmented'
@@ -92,7 +95,7 @@ Ext.define('saas.view.document.kind.Kind', {
             keyField:'id',
             reqUrl:'/api/document/producttype/save',
             delUrl:'/api/document/producttype/delete'
-        },
+        }, 
         productbrand:{
             columns: [{
                 text: '物料品牌',
@@ -103,6 +106,16 @@ Ext.define('saas.view.document.kind.Kind', {
             reqUrl:'/api/document/productbrand/save',
             delUrl:'/api/document/productbrand/delete'
         },
+        productunit:{
+            columns: [{
+                text: '计量单位',
+                dataIndex: 'pu_name',
+                flex: 1
+            }],
+            keyField:'id',
+            reqUrl:'/api/document/productunit/save',
+            delUrl:'/api/document/productunit/delete'
+        },
         bankinformation:{
             columns: [{
                 text: '账户编号',

+ 100 - 9
frontend/saas-web/app/view/document/kind/KindModel.js

@@ -25,7 +25,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         vendorkind:{
             fields:[
@@ -44,7 +52,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         productkind:{
             fields:[
@@ -63,7 +79,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         productbrand:{
             fields:[
@@ -82,7 +106,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         bankinformation:{
             fields:[
@@ -106,7 +138,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         inoutkind:{ 
             fields:[
@@ -126,7 +166,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         warehouse: {
             fields:[
@@ -148,7 +196,15 @@ Ext.define('saas.view.document.kind.KindModel', {
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         },
         address: {
             fields:[
@@ -164,11 +220,46 @@ Ext.define('saas.view.document.kind.KindModel', {
                 },
                 reader: {
                     type: 'json',
-                    rootProperty: 'data.list'
+                    rootProperty: 'data'
+                }
+            },
+            pageSize: null,
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
+        },
+        productunit: {
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'pu_name',  type: 'string'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: '/api/document/productunit/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data'
                 }
             },
             pageSize: null,
-            autoLoad: false
+            autoLoad: false,
+            listeners: {
+                beforeload: function (store, op) {
+                    Ext.apply(store.proxy.extraParams, {
+                        number: 1,
+                        size: 1000
+                    });
+                }
+            }
         }
     }
 });

+ 25 - 0
frontend/saas-web/app/view/document/other/ProductUnit.js

@@ -0,0 +1,25 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.other.ProductUnit', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'other-productunit',
+    autoScroll: true,
+    layout:'fit',
+    defaultType:'productunit',
+    tbar: ['->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }]
+})
+
+

+ 8 - 29
frontend/saas-web/app/view/document/product/BasePanel.js

@@ -6,43 +6,18 @@ Ext.define('saas.view.document.product.BasePanel', {
     viewModel: 'document-product-basepanel',
 
     searchField:[{
+        editable:false,
+        hiddenBtn:true,
         xtype : "remotecombo", 
         storeUrl: '/api/document/producttype/getCombo',
         name : "pr_type", 
-        emptyText : "请选择物料类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
-        columnWidth : 0.25,
-        etc:{
-            producttype:{
-                keyField:'id',
-                dataField:'pr_name',
-                reqUrl:'/api/document/producttype/save',
-                delUrl:'/api/document/producttype/delete'
-            }
-        },
-        addHandler:function(b){
-            var form = this.ownerCmp.ownerCt.ownerCt;
-            this.dialog = form.getController().getView().add({
-                xtype: 'document-kind-childwin',
-                bind: {
-                    title: '新增物料类型'
-                },
-                dataKind:'producttype',
-                belong:this.ownerCmp.etc['producttype'],
-                _parent:form,
-                record:null,
-                session: true
-            });
-            this.dialog.show();
-        }  
+        emptyText : "请选择物料类型"
     }],
 
     //字段属性
     _formXtype:'document-product-formpanel',
     _title:'物料资料',
+    _deleteUrl:'/api/document/product/delete/',
     // _dataUrl:'http://192.168.253.31:9480/product/list',
     _batchOpenUrl:'/api/document/product/batchOpen',
     _batchCloseUrl:'/api/document/product/batchClose',
@@ -90,4 +65,8 @@ Ext.define('saas.view.document.product.BasePanel', {
         }]
     },
 
+    refresh:function(){
+        this.items.items[0].store.load()
+    }
+
 });

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

@@ -27,7 +27,7 @@ Ext.define('saas.view.document.product.FormController', {
                             field:'ve_name',width:100
                         }],
                         //联想查询条件
-                        btplfield:"ve_name",
+                        dbtplfield:"ve_name",
                         //放大镜窗口字段
                         dbSearchFields:[{
                             xtype : "textfield", 
@@ -70,15 +70,19 @@ Ext.define('saas.view.document.product.FormController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         //数据接口
-                        dataUrl:'/api/document/product/getWareHouseByCondition',
+                        dataUrl:'/api/document/warehouse/list',
                         //放大镜赋值设置
                         dbfinds:[{
                             from:'wh_code',to:'pr_whcode'
                         },{
                             from:'wh_description',to:'pr_whname'
                         }],
+                        //新增地址
+                        addXtype:'other-warehouse',
+                        //新增标题
+                        addTitle:'仓库资料', 
                         //联想查询条件
-                        dbCondition:"CONCAT(wh_code, wh_description) like '{0}%'",
+                        dbtplfield:"pr_whcode",
                         //联想设置
                         dbtpls:[{
                             field:'wh_code',width:100

+ 24 - 49
frontend/saas-web/app/view/document/product/FormPanel.js

@@ -51,101 +51,76 @@ Ext.define('saas.view.document.product.FormPanel', {
         allowBlank: true,
         columnWidth: 0.25
     },{
+        editable:false,
         xtype : "remotecombo", 
         storeUrl:'/api/document/producttype/getCombo',
         name : "pr_type", 
         fieldLabel : "物料类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
+        allowBlank : false, 
         columnWidth : 0.25,
-        etc:{
-            producttype:{
-                keyField:'id',
-                dataField:'pr_name',
-                reqUrl:'/api/document/producttype/save',
-                delUrl:'/api/document/producttype/delete'
-            }
-        },
         addHandler:function(b){
+            var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {
-                    title: '新增物料类型'
+                    title: '新增供应商类型'
                 },
-                dataKind:'producttype',
-                belong:this.ownerCmp.etc['producttype'],
+                dataKind:'productkind',
+                belong:document.etc['productkind'],
                 _parent:form,
+                _combo:this.ownerCmp,
                 record:null,
                 session: true
             });
             this.dialog.show();
         }
     },{
+        editable:false,
         xtype : "remotecombo", 
-        storeUrl:'/api/document/product/getProdUnit',
+        storeUrl:'/api/document/productunit/getCombo',
         name : "pr_unit", 
-        bind : "{pr_unit}", 
         fieldLabel : "物料单位", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
+        allowBlank : false, 
         columnWidth : 0.25,
-        etc:{
-            produnit:{
-                keyField:'id',
-                dataField:'vk_name',
-                reqUrl:'/api/document/produnit/save',
-                delUrl:'/api/document/produnit/delete'
-            }
-        },
+        editable:false,
         addHandler:function(b){
+            var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {
                     title: '新增物料单位'
                 },
-                dataKind:'vendorkind',
-                belong:this.ownerCmp.etc['vendorkind'],
+                dataKind:'productunit',
+                belong:document.etc['productunit'],
                 _parent:form,
+                _combo:this.ownerCmp,
                 record:null,
                 session: true
             });
             this.dialog.show();
         }
     },{
+        editable:false,
         xtype : "remotecombo", 
-        storeUrl:'/api/document/product/getProdBrand',
+        storeUrl:'/api/document/productbrand/getCombo',
         name : "pr_brand", 
-        bind : "{pr_brand}", 
         fieldLabel : "物料品牌", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
+        allowBlank : false, 
         columnWidth : 0.25,
-        etc:{
-            productbrand:{
-                keyField:'id',
-                dataField:'pb_name',
-                reqUrl:'/api/document/productbrand/save',
-                delUrl:'/api/document/productbrand/delete'
-            }
-        },
         addHandler:function(b){
+            var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
                 bind: {
-                    title: '新增物料单位'
+                    title: '新增物料品牌'
                 },
                 dataKind:'productbrand',
-                belong:this.ownerCmp.etc['productbrand'],
+                belong:document.etc['productbrand'],
                 _parent:form,
+                _combo:this.ownerCmp,
                 record:null,
                 session: true
             });
@@ -222,13 +197,13 @@ Ext.define('saas.view.document.product.FormPanel', {
                 bind: '{' + statusCodeField + '}',
                 get: function(value) {
                     viewModel.set(statusField, value == 'OPEN' ? '已开启' : '已关闭');
-                    return value == 'OPEN' ? '已关闭' : '已开启'
+                    return value == 'OPEN' ? '禁用' : '启用'
                 }
             };
             viewModel.setFormulas(o);
             viewModel.set(statusCodeField, "OPEN");
         }else {
-            viewModel.set('auditBtnText', "已关闭");
+            viewModel.set('auditBtnText', "禁用");
         }
     }
 });

+ 12 - 27
frontend/saas-web/app/view/document/vendor/BasePanel.js

@@ -5,38 +5,13 @@ Ext.define('saas.view.document.vendor.BasePanel', {
     viewModel: 'document-vendor-basepanel',
 
     searchField:[{
+        editable:false,
         xtype : "remotecombo", 
         storeUrl:'/api/document/vendorkind/getCombo',
         name : "ve_type", 
         emptyText : "请选择供应商类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
         columnWidth : 0.25,
-        etc:{
-            vendorkind:{
-                keyField:'id',
-                dataField:'vk_name',
-                reqUrl:'/api/document/vendorkind/save',
-                delUrl:'/api/document/vendorkind/delete'
-            }
-        },
-        addHandler:function(b){
-            var form = this.ownerCmp.ownerCt.ownerCt;
-            this.dialog = form.getController().getView().add({
-                xtype: 'document-kind-childwin',
-                bind: {
-                    title: '新增供应商类型'
-                },
-                dataKind:'vendorkind',
-                belong:this.ownerCmp.etc['vendorkind'],
-                _parent:form,
-                record:null,
-                session: true
-            });
-            this.dialog.show();
-        }  
+        hiddenBtn:true
     }],
 
     //字段属性
@@ -70,6 +45,12 @@ Ext.define('saas.view.document.vendor.BasePanel', {
             width : 120.0, 
             xtype : "", 
         }, 
+        {
+            text : "供应商类型", 
+            dataIndex : "ve_type", 
+            width : 120.0, 
+            xtype : "", 
+        }, 
         {
             text : "供应商状态", 
             dataIndex : "ve_status", 
@@ -95,4 +76,8 @@ Ext.define('saas.view.document.vendor.BasePanel', {
             xtype : "",
         }]
     },
+
+    refresh:function(){
+        this.items.items[0].store.load()
+    }
 });

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

@@ -51,24 +51,15 @@ Ext.define('saas.view.document.vendor.FormPanel', {
         allowBlank: true,
         columnWidth: 0.25
     },{
+        editable:false,
         xtype : "remotecombo", 
         storeUrl:'/api/document/vendorkind/getCombo',
         name : "ve_type", 
         fieldLabel : "供应商类型", 
-        allowBlank : true, 
-        queryMode: 'local',
-        displayField: 'display',
-        valueField: 'value',
+        allowBlank : false, 
         columnWidth : 0.25,
-        etc:{
-            vendorkind:{
-                keyField:'id',
-                dataField:'vk_name',
-                reqUrl:'/api/document/vendorkind/save',
-                delUrl:'/api/document/vendorkind/delete'
-            }
-        },
         addHandler:function(b){
+            var document = Ext.create('saas.view.document.kind.Kind',{});
             var form = this.ownerCmp.ownerCt;
             this.dialog = form.getController().getView().add({
                 xtype: 'document-kind-childwin',
@@ -76,8 +67,9 @@ Ext.define('saas.view.document.vendor.FormPanel', {
                     title: '新增供应商类型'
                 },
                 dataKind:'vendorkind',
-                belong:this.ownerCmp.etc['vendorkind'],
+                belong:document.etc['vendorkind'],
                 _parent:form,
+                _combo:this.ownerCmp,
                 record:null,
                 session: true
             });
@@ -202,7 +194,7 @@ Ext.define('saas.view.document.vendor.FormPanel', {
             {
                 editor : {
                     displayField : "display", 
-                    editable : true, 
+                    editable:false,
                     format : "", 
                     hideTrigger : false, 
                     maxLength : 100.0, 
@@ -255,13 +247,13 @@ Ext.define('saas.view.document.vendor.FormPanel', {
                 bind: '{' + statusCodeField + '}',
                 get: function(value) {
                     viewModel.set(statusField, value == 'OPEN' ? '已开启' : '已关闭');
-                    return value == 'OPEN' ? '已关闭' : '已开启'
+                    return value == 'OPEN' ? '禁用' : '启用'
                 }
             };
             viewModel.setFormulas(o);
             viewModel.set(statusCodeField, "OPEN");
         }else {
-            viewModel.set('auditBtnText', "已关闭");
+            viewModel.set('auditBtnText', "禁用");
         }
     }
 });

+ 19 - 13
frontend/saas-web/app/view/money/fundtransfer/FormPanel.js

@@ -125,23 +125,29 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                 }
             }, {
                 text : "结算方式", 
-                width : 200.0, 
+                width : 150.0, 
                 dataIndex : "ftd_paymethod", 
                 xtype : "", 
                 items : null,
-                editor : {
-                    displayField : "display", 
-                    editable : true, 
-                    format : "", 
-                    hideTrigger : false, 
-                    maxLength : 100.0, 
-                    minValue : null, 
-                    positiveNum : false, 
-                    queryMode : "local", 
-                    store : null, 
-                    valueField : "value", 
-                    xtype : "dbfindtrigger"
+                editor:{
+                    xtype: 'combobox',
+                    name: 'ftd_paymethod',
+                    queryMode: 'local',
+                    displayField: 'ftd_paymethod_d',
+                    valueField: 'ftd_paymethod',
+                    editable:false,
+                    store: Ext.create('Ext.data.ArrayStore', {
+                        fields: ['ftd_paymethod', 'ftd_paymethod_d'],
+                        data: [
+                            ["无", "无"],
+                            ["支付宝转账", "支付宝转账"],
+                            ["微信转账", "微信转账"],
+                            ["现金", "现金"],
+                            ["银行转账", "银行转账"]
+                        ]
+                    })
                 }
+                
             }, {
                 text : "备注", 
                 dataIndex : "ftd_remark",

+ 32 - 6
frontend/saas-web/app/view/money/fundtransfer/FormPanelController.js

@@ -32,19 +32,32 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
-                            "width": 100,
+                            "width": 120,
                             "xtype": ""
                         }, {
                             "text": "账户名称",
                             "flex": 1,
                             "dataIndex": "bk_bankname",
+                            "width": 150,
                             "xtype": ""
                         }, {
                             "text": "账户类型",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "bk_type",
-                            "width": 200,
+                            "width": 120,
                             "xtype": ""
+                        }, {
+                            "text": "账户余额",
+                            "flex": 1,
+                            "dataIndex": "bk_thisamount",
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "建帐日期",
+                            "flex": 1,
+                            "dataIndex": "bk_date",
+                            "width": 120,
+                            "xtype": "datecolumn"
                         }]
                     }) ;   
 
@@ -77,19 +90,32 @@ Ext.define('saas.view.money.fundtransfer.FormPanelController', {
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
-                            "width": 100,
+                            "width": 120,
                             "xtype": ""
                         }, {
                             "text": "账户名称",
                             "flex": 1,
                             "dataIndex": "bk_bankname",
+                            "width": 150,
                             "xtype": ""
                         }, {
                             "text": "账户类型",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "bk_type",
-                            "width": 200,
+                            "width": 120,
                             "xtype": ""
+                        }, {
+                            "text": "账户余额",
+                            "flex": 1,
+                            "dataIndex": "bk_thisamount",
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "建帐日期",
+                            "flex": 1,
+                            "dataIndex": "bk_date",
+                            "width": 120,
+                            "xtype": "datecolumn"
                         }]
                     }) ;   
 

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

@@ -29,7 +29,7 @@ Ext.define('saas.view.money.fundtransfer.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'ft_code',
-            width: 120
+            width: 150
         }, {
             text: '单据状态',
             dataIndex: 'ft_status',

+ 6 - 19
frontend/saas-web/app/view/money/othreceipts/FormPanel.js

@@ -78,32 +78,19 @@ Ext.define('saas.view.money.othreceipts.FormPanel', {
                 items : null,
                 editor : {
                     xtype : "remotecombo", 
-                    storeUrl:'/api/document/fundinoutType/list',
-                    name : "ord_type", 
-                    fieldLabel : "收入类别", 
-                    allowBlank : true, 
-                    queryMode: 'local',
-                    displayField: 'display',
-                    valueField: 'value',
-                    columnWidth : 0.25,
-                    etc:{
-                        inoutkind:{
-                            keyField:'id',
-                            dataField:'ft_name',
-                            reqUrl:'/api/document/fundinoutType/save',
-                            delUrl:'/api/document/fundinoutType/delete'
-                        }
-                    },
+                    storeUrl:'/api/document/inoutkind/getCombo',
                     addHandler:function(b){
-                        var form = this.ownerCmp.ownerCt.ownerCmp.ownerCt;
+                        var document = Ext.create('saas.view.document.kind.Kind',{});
+                        var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;
                         this.dialog = form.getController().getView().add({
                             xtype: 'document-kind-childwin',
                             bind: {
-                                title: '新增收入类型'
+                                title: '新增收入类别类型'
                             },
                             dataKind:'inoutkind',
-                            belong:this.ownerCmp.etc['inoutkind'],
+                            belong:document.etc['inoutkind'],
                             _parent:form,
+                            _combo:this.ownerCmp,
                             record:null,
                             session: true
                         });

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

@@ -8,7 +8,7 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
             'dbfindtrigger[name=or_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
                         dbfinds:[{
@@ -23,30 +23,69 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
                         },{
                             field:'cu_name',width:100
                         }],
-                        dbColumns:[{
-                            "text": "客户ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 100,
-                            "xtype": ""
-                        },{
-                            "text": "客户编号",
-                            "flex": 1,
-                            "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": ""
-                        }, {
-                            "text": "客户名称",
-                            "flex": 1,
-                            "dataIndex": "cu_name",
-                            "xtype": ""
-                        }, {
-                            "text": "客户类型",
-                            "flex": 0,
-                            "dataIndex": "cu_type",
-                            "width": 200,
-                            "xtype": ""
-                        }]
+                        dbColumns:[
+                            {
+                                conditionCode:'id',
+                                "text": "客户ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                conditionCode:'cu_code',
+                                "text": "客户编号",
+                                "flex": 1,
+                                "dataIndex": "cu_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_name',
+                                "text": "客户名称",
+                                "flex": 1,
+                                "dataIndex": "cu_name",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_type',
+                                "text": "客户类型",
+                                "flex": 1,
+                                "dataIndex": "cu_type",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "业务员编号",
+                                "flex": 1,
+                                "dataIndex": "cu_sellercode",
+                                "width": 100
+                            }, {
+                                "text": "业务员",
+                                "flex": 1,
+                                "dataIndex": "cu_sellername",
+                                "width": 100
+                            }, {
+                                "text": "税率",
+                                "flex": 1,
+                                "dataIndex": "cu_taxrate",
+                                "width": 100
+                            }, {
+                                "text": "承付天数",
+                                "flex": 1,
+                                "dataIndex": "cu_promisedays",
+                                "width": 100
+                            }, {
+                                "text": "额度",
+                                "flex": 1,
+                                "dataIndex": "cu_credit",
+                                "width": 100
+                            }, {
+                                "text": "客户地址",
+                                "flex": 1,
+                                "dataIndex": "ca_address",
+                                "width": 250
+                            }]
                     }) ;   
 
                 }
@@ -78,19 +117,32 @@ Ext.define('saas.view.money.othreceipts.FormPanelController', {
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
-                            "width": 100,
+                            "width": 120,
                             "xtype": ""
                         }, {
                             "text": "账户名称",
                             "flex": 1,
                             "dataIndex": "bk_bankname",
+                            "width": 150,
                             "xtype": ""
                         }, {
                             "text": "账户类型",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "bk_type",
-                            "width": 200,
+                            "width": 120,
                             "xtype": ""
+                        }, {
+                            "text": "账户余额",
+                            "flex": 1,
+                            "dataIndex": "bk_thisamount",
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "建帐日期",
+                            "flex": 1,
+                            "dataIndex": "bk_date",
+                            "width": 120,
+                            "xtype": "datecolumn"
                         }]
                     }) ;   
 

+ 80 - 28
frontend/saas-web/app/view/money/othreceipts/QueryPanelController.js

@@ -8,7 +8,7 @@ Ext.define('saas.view.money.othreceipts.QueryPanelController', {
             'dbfindtrigger[name=or_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
                         dbfinds:[{
@@ -23,30 +23,69 @@ Ext.define('saas.view.money.othreceipts.QueryPanelController', {
                         },{
                             field:'cu_name',width:100
                         }],
-                        dbColumns:[{
-                            "text": "客户ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 100,
-                            "xtype": ""
-                        },{
-                            "text": "客户编号",
-                            "flex": 1,
-                            "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": ""
-                        }, {
-                            "text": "客户名称",
-                            "flex": 1,
-                            "dataIndex": "cu_name",
-                            "xtype": ""
-                        }, {
-                            "text": "客户类型",
-                            "flex": 0,
-                            "dataIndex": "cu_type",
-                            "width": 200,
-                            "xtype": ""
-                        }]
+                        dbColumns:[
+                            {
+                                conditionCode:'id',
+                                "text": "客户ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                conditionCode:'cu_code',
+                                "text": "客户编号",
+                                "flex": 1,
+                                "dataIndex": "cu_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_name',
+                                "text": "客户名称",
+                                "flex": 1,
+                                "dataIndex": "cu_name",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_type',
+                                "text": "客户类型",
+                                "flex": 1,
+                                "dataIndex": "cu_type",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "业务员编号",
+                                "flex": 1,
+                                "dataIndex": "cu_sellercode",
+                                "width": 100
+                            }, {
+                                "text": "业务员",
+                                "flex": 1,
+                                "dataIndex": "cu_sellername",
+                                "width": 100
+                            }, {
+                                "text": "税率",
+                                "flex": 1,
+                                "dataIndex": "cu_taxrate",
+                                "width": 100
+                            }, {
+                                "text": "承付天数",
+                                "flex": 1,
+                                "dataIndex": "cu_promisedays",
+                                "width": 100
+                            }, {
+                                "text": "额度",
+                                "flex": 1,
+                                "dataIndex": "cu_credit",
+                                "width": 100
+                            }, {
+                                "text": "客户地址",
+                                "flex": 1,
+                                "dataIndex": "ca_address",
+                                "width": 250
+                            }]
                     }) ;   
 
                 }
@@ -78,19 +117,32 @@ Ext.define('saas.view.money.othreceipts.QueryPanelController', {
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
-                            "width": 100,
+                            "width": 120,
                             "xtype": ""
                         }, {
                             "text": "账户名称",
                             "flex": 1,
                             "dataIndex": "bk_bankname",
+                            "width": 150,
                             "xtype": ""
                         }, {
                             "text": "账户类型",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "bk_type",
-                            "width": 200,
+                            "width": 120,
                             "xtype": ""
+                        }, {
+                            "text": "账户余额",
+                            "flex": 1,
+                            "dataIndex": "bk_thisamount",
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "建帐日期",
+                            "flex": 1,
+                            "dataIndex": "bk_date",
+                            "width": 120,
+                            "xtype": "datecolumn"
                         }]
                     }) ;   
 

+ 6 - 19
frontend/saas-web/app/view/money/othspendings/FormPanel.js

@@ -78,32 +78,19 @@ Ext.define('saas.view.money.othspendings.FormPanel', {
                 items : null,
                 editor : {
                     xtype : "remotecombo", 
-                    storeUrl:'/api/document/fundinoutType/list',
-                    name : "osd_type", 
-                    fieldLabel : "支出类别", 
-                    allowBlank : true, 
-                    queryMode: 'local',
-                    displayField: 'display',
-                    valueField: 'value',
-                    columnWidth : 0.25,
-                    etc:{
-                        inoutkind:{
-                            keyField:'id',
-                            dataField:'ft_name',
-                            reqUrl:'/api/document/fundinoutType/save',
-                            delUrl:'/api/document/fundinoutType/delete'
-                        }
-                    },
+                    storeUrl:'/api/document/inoutkind/getCombo',
                     addHandler:function(b){
-                        var form = this.ownerCmp.ownerCt.ownerCmp.ownerCt;
+                        var document = Ext.create('saas.view.document.kind.Kind',{});
+                        var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;
                         this.dialog = form.getController().getView().add({
                             xtype: 'document-kind-childwin',
                             bind: {
-                                title: '新增收入类型'
+                                title: '新增收入类别类型'
                             },
                             dataKind:'inoutkind',
-                            belong:this.ownerCmp.etc['inoutkind'],
+                            belong:document.etc['inoutkind'],
                             _parent:form,
+                            _combo:this.ownerCmp,
                             record:null,
                             session: true
                         });

+ 49 - 18
frontend/saas-web/app/view/money/othspendings/FormPanelController.js

@@ -28,31 +28,53 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
                             field: 've_name',
                             width: 100
                         }],
-                        dbColumns: [{
+                        dbColumns:[{
                             "text": "供应商ID",
                             "flex": 0,
                             "dataIndex": "id",
                             "width": 100,
                             "xtype": "numbercolumn"
-                        }, {
-                            conditionCode: 've_code',
+                        },{
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
                             "width": 100
                         }, {
-                            conditionCode: 've_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
                             "width": 100
                         }, {
-                            conditionCode: 'cu_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     });
 
@@ -80,33 +102,42 @@ Ext.define('saas.view.money.othspendings.FormPanelController', {
                             field: 'bk_bankname',
                             width: 100
                         }],
-                        dbColumns: [{
+                        dbColumns:[{
                             "text": "账户ID",
                             "flex": 0,
                             "dataIndex": "id",
                             "width": 0,
-                            "xtype": "",
-                            "items": null
-                        }, {
+                            "xtype": ""
+                        },{
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 120,
+                            "xtype": ""
                         }, {
                             "text": "账户名称",
                             "flex": 1,
                             "dataIndex": "bk_bankname",
-                            "xtype": "",
-                            "items": null
+                            "width": 150,
+                            "xtype": ""
                         }, {
                             "text": "账户类型",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "bk_type",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "账户余额",
+                            "flex": 1,
+                            "dataIndex": "bk_thisamount",
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "建帐日期",
+                            "flex": 1,
+                            "dataIndex": "bk_date",
+                            "width": 120,
+                            "xtype": "datecolumn"
                         }]
                     });
 

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

@@ -54,7 +54,7 @@ Ext.define('saas.view.money.othspendings.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'os_code',
-            width: 120
+            width: 150
         }, {
             text: '单据状态',
             dataIndex: 'os_status',

+ 45 - 14
frontend/saas-web/app/view/money/othspendings/QueryPanelController.js

@@ -30,24 +30,46 @@ Ext.define('saas.view.money.othspendings.QueryPanelController', {
                             "width": 100,
                             "xtype": "numbercolumn"
                         },{
-                            conditionCode:'ve_code',
                             "text": "供应商编号",
                             "flex": 1,
                             "dataIndex": "ve_code",
                             "width": 100
                         }, {
-                            conditionCode:'ve_name',
                             "text": "供应商名称",
                             "flex": 1,
                             "dataIndex": "ve_name",
                             "width": 100
                         }, {
-                            conditionCode:'cu_type',
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
                             "width": 200,
                             "items": null
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "ve_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "ve_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "纳税人识别号",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "开户银行",
+                            "flex": 1,
+                            "dataIndex": "ve_bankaccount",
+                            "width": 100
+                        }, {
+                            "text": "银行账户",
+                            "flex": 1,
+                            "dataIndex": "ve_bankcode",
+                            "width": 100
                         }]
                     }) ;   
 
@@ -76,28 +98,37 @@ Ext.define('saas.view.money.othspendings.QueryPanelController', {
                             "flex": 0,
                             "dataIndex": "id",
                             "width": 0,
-                            "xtype": "numbercolumn",
-                            "items": null
+                            "xtype": ""
                         },{
                             "text": "账户编号",
                             "flex": 1,
                             "dataIndex": "bk_bankcode",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
+                            "width": 120,
+                            "xtype": ""
                         }, {
                             "text": "账户名称",
                             "flex": 1,
                             "dataIndex": "bk_bankname",
-                            "xtype": "",
-                            "items": null
+                            "width": 150,
+                            "xtype": ""
                         }, {
                             "text": "账户类型",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "bk_type",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "账户余额",
+                            "flex": 1,
+                            "dataIndex": "bk_thisamount",
+                            "width": 120,
+                            "xtype": ""
+                        }, {
+                            "text": "建帐日期",
+                            "flex": 1,
+                            "dataIndex": "bk_date",
+                            "width": 120,
+                            "xtype": "datecolumn"
                         }]
                     }) ;   
 

+ 3 - 0
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -35,6 +35,9 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
      toolBtns: [{
          xtype: 'button',
          text: '转采购验收单',
+         bind: {
+            hidden: '{!id}'
+        },
          handler: 'turnIn'
      }],
 

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

@@ -145,7 +145,8 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                 beforerender:function(f){
                     Ext.apply(f,{
                         //数据接口
-                        dataUrl:'http://192.168.253.31:9480/product/getProductsByCondition',
+                        // dataUrl:'http://192.168.253.31:9480/product/getProductsByCondition',
+                        dataUrl: '/api/document/product/list',
                         //放大镜赋值设置
                         dbfinds:[{
                             from:'pr_code',to:'pd_prodcode'
@@ -215,8 +216,13 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
         })
         .then(function(localJson) {
             if(localJson.success){
-                showToast('转单成功');
-              
+                var intValue = localJson.data.id,
+                    codeValue= localJson.data.code,
+                    name = localJson.data.name;
+                openTab('purchase-purchasein-formpanel',name+"("+codeValue+")",codeValue+intValue, {
+                    initId: intValue
+                });
+                showToast('转单成功');    
             }
         })
         .catch(function(res) {

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

@@ -37,6 +37,9 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     toolBtns: [{
         xtype: 'button',
         text: '转采购验退单',
+        bind: {
+            hidden: '{!id}'
+        },
         handler: 'turnOut'
     }],
 
@@ -104,7 +107,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     }, {
         name : "detailGridField", 
         xtype : "detailGridField",
-        storeModel:'saas.model.document.ProductDTO',
+        storeModel:'saas.model.purchase.prodindetail',
         // deleteDetailUrl:'http://localhost:8800/prodinout/deleteDetail/',
         deleteDetailUrl:'api/purchase/prodinout/deleteDetail/',
         detnoColumn:  'pd_pdno',
@@ -192,17 +195,28 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
                 width : 120.0, 
                 items : null,
                 editor : {
-                    displayField : "display", 
-                    editable : true, 
-                    format : "", 
-                    hideTrigger : false, 
-                    maxLength : 100.0, 
-                    minValue : null, 
-                    positiveNum : false, 
-                    queryMode : "local", 
-                    store : null, 
-                    valueField : "value", 
-                    xtype : "dbfindtrigger"
+                    editable:false,
+                    xtype : "remotecombo", 
+                    storeUrl:'/api/document/warehouse/getCombo',
+                    name : "wh_name", 
+                    hiddenBtn:false,//true 则会关闭新增按钮功能
+                    addHandler:function(b){
+                        var document = Ext.create('saas.view.document.kind.Kind',{});
+                        var form =this.ownerCmp.ownerCt.ownerCmp.ownerCt;
+                        this.dialog = form.getController().getView().add({
+                            xtype: 'document-kind-childwin',
+                            bind: {
+                                title: '新增供应商类型'
+                            },
+                            dataKind:'warehouse',
+                            belong:document.etc['warehouse'],
+                            _parent:form,
+                            _combo:this.ownerCmp,
+                            record:null,
+                            session: true
+                        });
+                        this.dialog.show();
+                    }
                 }
             },
             {

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

@@ -215,6 +215,12 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
         })
         .then(function(localJson) {
             if(localJson.success){
+                var intValue = localJson.data.id,
+                codeValue= localJson.data.code,
+                name = localJson.data.name;
+                openTab('purchase-purchaseout-formpanel',name+"("+codeValue+")",codeValue+intValue, {
+                    initId: intValue
+                });
                 showToast('转单成功');
               
             }

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

@@ -66,7 +66,7 @@ Ext.define('saas.view.sale.sale.FormPanel', {
                 width:0
             }, {
                 text : "物料id", 
-                dataIndex : "pd_prodid", 
+                dataIndex : "sd_prodid", 
                 width : 0
             }, {
                 text : "物料编号", 
@@ -198,9 +198,8 @@ Ext.define('saas.view.sale.sale.FormPanel', {
     }, {
         format : "Y-m-d", 
         xtype : "datefield", 
-        name : "sa_recorddate", 
+        name : "createTime", 
         fieldLabel : "录入日期",
-        defaultValue:new Date(),
         readOnly:true
     }, {
         xtype : "textfield", 

+ 146 - 67
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -8,53 +8,87 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
             'dbfindtrigger[name=sa_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
-                        dbfinds:[{
-                            from:'id',to:'sa_custid'
-                        },{
-                            from:'cu_code',to:'sa_custcode'
-                        },{
-                            from:'cu_name',to:'sa_custname'
+                        dbfinds:[
+                            {
+                                from:'id',to:'sa_custid'
+                            },{
+                                from:'cu_code',to:'sa_custcode'
+                            },{
+                                from:'cu_name',to:'sa_custname'
+                            },{
+                                from:'ca_address',to:'sa_address'
                         }],
                         dbtpls:[{
                             field:'cu_code',width:100
                         },{
                             field:'cu_name',width:100
                         }],
-                        dbColumns:[{
-                            conditionCode:'id',
-                            "text": "客户ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            conditionCode:'cu_code',
-                            "text": "客户编号",
-                            "flex": 1,
-                            "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'cu_name',
-                            "text": "客户名称",
-                            "flex": 1,
-                            "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'cu_type',
-                            "text": "客户类型",
-                            "flex": 0,
-                            "dataIndex": "cu_type",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                        dbColumns:[
+                            {
+                                conditionCode:'id',
+                                "text": "客户ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                conditionCode:'cu_code',
+                                "text": "客户编号",
+                                "flex": 1,
+                                "dataIndex": "cu_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_name',
+                                "text": "客户名称",
+                                "flex": 1,
+                                "dataIndex": "cu_name",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_type',
+                                "text": "客户类型",
+                                "flex": 1,
+                                "dataIndex": "cu_type",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "业务员编号",
+                                "flex": 1,
+                                "dataIndex": "cu_sellercode",
+                                "width": 100
+                            }, {
+                                "text": "业务员",
+                                "flex": 1,
+                                "dataIndex": "cu_sellername",
+                                "width": 100
+                            }, {
+                                "text": "税率",
+                                "flex": 1,
+                                "dataIndex": "cu_taxrate",
+                                "width": 100
+                            }, {
+                                "text": "承付天数",
+                                "flex": 1,
+                                "dataIndex": "cu_promisedays",
+                                "width": 100
+                            }, {
+                                "text": "额度",
+                                "flex": 1,
+                                "dataIndex": "cu_credit",
+                                "width": 100
+                            }, {
+                                "text": "客户地址",
+                                "flex": 1,
+                                "dataIndex": "ca_address",
+                                "width": 250
+                            }]
                     }) ;   
 
                 }
@@ -73,40 +107,85 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
                             from:'pr_detail',to:'pr_detail'
                         }, {
                             from:'pr_spec',to:'pr_spec'
+                        }, {
+                            from:'id',to:'sd_prodid'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100
                         },{
                             field:'pr_detail',width:100
                         }],
-                        dbColumns:[{
-                            "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
-                            "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料名称",
-                            "flex": 1,
-                            "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料规格",
-                            "flex": 0,
-                            "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                        dbColumns:[
+                            {
+                                "text": "物料ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                "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
+                            }]
                     }) ;   
 
                 }

+ 74 - 37
frontend/saas-web/app/view/sale/sale/QueryPanelController.js

@@ -8,7 +8,7 @@ Ext.define('saas.view.sale.sale.QueryPanelController', {
             'dbfindtrigger[name=sa_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
                         dbfinds:[{
@@ -67,7 +67,8 @@ Ext.define('saas.view.sale.sale.QueryPanelController', {
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         dbfinds:[{
-                            from:'pr_code',to:'sd_prodcode',
+                            from:'pr_code',to:'sd_prodcode'
+                        },{
                             from:'pr_detail',to:'pr_detail'
                         }],
                         dbtpls:[{
@@ -75,41 +76,77 @@ Ext.define('saas.view.sale.sale.QueryPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
-                        dbColumns:[{
-                            "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
-                            "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料名称",
-                            "flex": 1,
-                            "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料规格",
-                            "flex": 0,
-                            "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                        dbColumns:[
+                            {
+                                "text": "物料ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                "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
+                            }]
                     }) ;   
 
                 }

+ 20 - 8
frontend/saas-web/app/view/sale/saleIn/FormPanel.js

@@ -43,6 +43,10 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
         xtype : "hidden", 
         name : "pi_custcode",  
         fieldLabel : "客户编号"
+    }, {
+        xtype : "dbfindtrigger", 
+        name : "pi_custname", 
+        fieldLabel : "客户名称"
     }, {
         xtype : "textfield", 
         name : "pi_address", 
@@ -53,7 +57,7 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
         xtype : "detailGridField", 
         detnoColumn:  'pd_pdno',
         storeModel:'saas.model.sale.ProdIODetail',
-        deleteDetailUrl:'/api/prodinout/deleteDetail/',
+        deleteDetailUrl:'/api/sale/prodinout/deleteDetail/',
         columns : [
             {
                 text : "id", 
@@ -179,24 +183,32 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
                 flex:1
             }
         ]
-    },{
+    }, {
+        xtype : "textfield", 
+        name : "pi_total", 
+        fieldLabel : "总额", 
+        readOnly: true
+    }, {
         xtype : "textfield", 
         name : "pi_recordman", 
-        fieldLabel : "录入人",
-        readOnly:true,
+        fieldLabel : "录入人", 
+        readOnly:true
     }, {
         format : "Y-m-d", 
         xtype : "datefield", 
         name : "createTime", 
-        fieldLabel : "创建时间"
+        fieldLabel : "录入日期",
+        readOnly:true
     }, {
         xtype : "textfield", 
         name : "pi_auditman", 
-        fieldLabel : "过账人"
+        fieldLabel : "审核人", 
+        readOnly:true
     }, {
         format : "Y-m-d", 
         xtype : "datefield", 
-        name : "pi_auditman", 
-        fieldLabel : "过账时间"
+        name : "pi_auditdate", 
+        fieldLabel : "审核日期",
+        readOnly:true
     }]
 });

+ 112 - 44
frontend/saas-web/app/view/sale/saleIn/FormPanelController.js

@@ -8,16 +8,18 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
             'dbfindtrigger[name=pi_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
                         dbfinds:[
-                        {
-                            from:'id',to:'pi_custid'
-                        },{
-                            from:'cu_code',to:'pi_custcode'
-                        },{
-                            from:'cu_name',to:'pi_custname'
+                            {
+                                from:'id',to:'pi_custid'
+                            },{
+                                from:'cu_code',to:'pi_custcode'
+                            },{
+                                from:'cu_name',to:'pi_custname'
+                            },{
+                                from:'ca_address',to:'pi_address'
                         }],
                         dbtpls:[
                         {
@@ -31,7 +33,7 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                             "text": "客户ID",
                             "flex": 0,
                             "dataIndex": "id",
-                            "width": 100,
+                            "width": 0,
                             "xtype": "",
                             "items": null
                         },{
@@ -52,11 +54,41 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                         }, {
                             conditionCode:'cu_type',
                             "text": "客户类型",
-                            "flex": 0,
+                            "flex": 1,
                             "dataIndex": "cu_type",
                             "width": 200,
                             "xtype": "",
                             "items": null
+                        }, {
+                            "text": "业务员编号",
+                            "flex": 1,
+                            "dataIndex": "cu_sellercode",
+                            "width": 100
+                        }, {
+                            "text": "业务员",
+                            "flex": 1,
+                            "dataIndex": "cu_sellername",
+                            "width": 100
+                        }, {
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "cu_taxrate",
+                            "width": 100
+                        }, {
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "cu_promisedays",
+                            "width": 100
+                        }, {
+                            "text": "额度",
+                            "flex": 1,
+                            "dataIndex": "cu_credit",
+                            "width": 100
+                        }, {
+                            "text": "客户地址",
+                            "flex": 1,
+                            "dataIndex": "ca_address",
+                            "width": 250
                         }]
                     }) ;   
                 }
@@ -83,41 +115,77 @@ Ext.define('saas.view.sale.saleIn.FormPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
-                        dbColumns:[{
-                            "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
-                            "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料名称",
-                            "flex": 1,
-                            "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料规格",
-                            "flex": 0,
-                            "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                        dbColumns:[
+                            {
+                                "text": "物料ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                "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
+                            }]
                     }) ;   
 
                 }

+ 6 - 4
frontend/saas-web/app/view/sale/saleIn/QueryPanel.js

@@ -31,11 +31,13 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
     }, {
         xtype: 'dbfindtrigger',
         name: 'pd_prodcode',
-        fieldLabel: '物料编号'
+        fieldLabel: '物料编号',
+        showDetail: true
     }, {
         xtype: 'textfield',
         name: 'pr_detail',
-        fieldLabel: '物料名称'
+        fieldLabel: '物料名称',
+        showDetail: true
     }, {
         xtype: 'combobox',
         name: 'pi_statuscode',
@@ -68,7 +70,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         addTitle:'销售退货单',
         addXtype:'sale-salein-formpanel',
         defaultCondition:' pi_class = \'销售退货单\'',
-        baseVastUrl: '/api/sale/prodinout/',
+        baseVastUrl: 'http://192.168.253.48:8820/prodinout/',
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
@@ -77,7 +79,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 150
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

+ 71 - 36
frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js

@@ -8,7 +8,7 @@ Ext.define('saas.view.sale.saleIn.QueryPanelController', {
             'dbfindtrigger[name=pi_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
                         dbfinds:[
@@ -82,41 +82,76 @@ Ext.define('saas.view.sale.saleIn.QueryPanelController', {
                             field:'pr_detail',width:100
                         }],
                         dbColumns:[
-                        {
-                            "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
-                            "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料名称",
-                            "flex": 1,
-                            "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料规格",
-                            "flex": 0,
-                            "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                            {
+                                "text": "物料ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                "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
+                            }]
                     }) ;   
 
                 }

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

@@ -166,6 +166,9 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
                 dataIndex : "pd_taxrate", 
                 width : 120.0, 
                 xtype : "numbercolumn", 
+                editor : {
+                    xtype : "numberfield"
+                },
                 items : null
             },
             {
@@ -197,7 +200,7 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
     }, {
         format : "Y-m-d", 
         xtype : "datefield", 
-        name : "pi_recorddate", 
+        name : "createTime", 
         fieldLabel : "录入日期",
         readOnly:true
     }, {

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

@@ -9,7 +9,7 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
             'dbfindtrigger[name=pi_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
                         dbfinds:[
@@ -19,6 +19,8 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                             from:'cu_code',to:'pi_custcode'
                         },{
                             from:'cu_name',to:'pi_custname'
+                        },{
+                            from:'ca_address',to:'pi_address'
                         }],
                         dbtpls:[
                         {
@@ -27,38 +29,64 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                             field:'cu_name',width:100
                         }],
                         dbColumns:[
-                        {
-                            conditionCode:'id',
-                            "text": "客户ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            conditionCode:'cu_code',
-                            "text": "客户编号",
-                            "flex": 1,
-                            "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'cu_name',
-                            "text": "客户名称",
-                            "flex": 1,
-                            "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'cu_type',
-                            "text": "客户类型",
-                            "flex": 0,
-                            "dataIndex": "cu_type",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                            {
+                                "text": "客户ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                "text": "客户编号",
+                                "flex": 1,
+                                "dataIndex": "cu_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "客户名称",
+                                "flex": 1,
+                                "dataIndex": "cu_name",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "客户类型",
+                                "flex": 1,
+                                "dataIndex": "cu_type",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "业务员编号",
+                                "flex": 1,
+                                "dataIndex": "cu_sellercode",
+                                "width": 100
+                            }, {
+                                "text": "业务员",
+                                "flex": 1,
+                                "dataIndex": "cu_sellername",
+                                "width": 100
+                            }, {
+                                "text": "税率",
+                                "flex": 1,
+                                "dataIndex": "cu_taxrate",
+                                "width": 100
+                            }, {
+                                "text": "承付天数",
+                                "flex": 1,
+                                "dataIndex": "cu_promisedays",
+                                "width": 100
+                            }, {
+                                "text": "额度",
+                                "flex": 1,
+                                "dataIndex": "cu_credit",
+                                "width": 100
+                            }, {
+                                "text": "客户地址",
+                                "flex": 1,
+                                "dataIndex": "ca_address",
+                                "width": 250
+                            }]
                     }) ;   
                 }
             },
@@ -85,41 +113,77 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
                         },{
                             field:'pr_detail',width:100
                         }],
-                        dbColumns:[{
-                            "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 0,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            "text": "物料编号",
-                            "flex": 1,
-                            "dataIndex": "pr_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料名称",
-                            "flex": 1,
-                            "dataIndex": "pr_detail",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料规格",
-                            "flex": 0,
-                            "dataIndex": "pr_spec",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            "text": "物料单位",
-                            "flex": 0,
-                            "dataIndex": "pr_unit",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                        dbColumns:[
+                            {
+                                "text": "物料ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                "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
+                            }]
                     }) ;   
 
                 }

+ 4 - 3
frontend/saas-web/app/view/sale/saleOut/QueryPanel.js

@@ -33,7 +33,8 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
     }, {
         xtype: 'hidden',
         name: 'pd_prodcode',
-        fieldLabel: '物料编号'
+        fieldLabel: '物料编号',
+        showDetail: true
     }, {
         xtype: 'dbfindtrigger',
         name: 'pr_detail',
@@ -73,12 +74,12 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
         baseColumn: [{
             text: 'id',
             dataIndex: 'id',
-            width: 100,
+            width: 0,
             xtype: 'numbercolumn'
         }, {
             text: '单据编号',
             dataIndex: 'pi_inoutno',
-            width: 120
+            width: 150
         }, {
             text: '单据状态',
             dataIndex: 'pi_status',

+ 104 - 37
frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.sale.saleout.QueryPanelController', {
             'dbfindtrigger[name=pi_custname]':{
                 beforerender:function(f){
                     Ext.apply(f,{
-                        dataUrl:'/api/document/customer/list',
+                        dataUrl:'/api/document/customer/dbfind',
                         addXtype: 'document-customer-formpanel',
                         addTitle: '客户资料',
                         dbfinds:[
@@ -19,6 +19,8 @@ Ext.define('saas.view.sale.saleout.QueryPanelController', {
                             from:'cu_code',to:'pi_custcode'
                         },{
                             from:'cu_name',to:'pi_custname'
+                        },{
+                            from:'ca_address',to:'pi_address'
                         }],
                         dbtpls:[
                         {
@@ -27,38 +29,68 @@ Ext.define('saas.view.sale.saleout.QueryPanelController', {
                             field:'cu_name',width:100
                         }],
                         dbColumns:[
-                        {
-                            conditionCode:'id',
-                            "text": "客户ID",
-                            "flex": 0,
-                            "dataIndex": "id",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        },{
-                            conditionCode:'cu_code',
-                            "text": "客户编号",
-                            "flex": 1,
-                            "dataIndex": "cu_code",
-                            "width": 100,
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'cu_name',
-                            "text": "客户名称",
-                            "flex": 1,
-                            "dataIndex": "cu_name",
-                            "xtype": "",
-                            "items": null
-                        }, {
-                            conditionCode:'cu_type',
-                            "text": "客户类型",
-                            "flex": 0,
-                            "dataIndex": "cu_type",
-                            "width": 200,
-                            "xtype": "",
-                            "items": null
-                        }]
+                            {
+                                conditionCode:'id',
+                                "text": "客户ID",
+                                "flex": 0,
+                                "dataIndex": "id",
+                                "width": 0,
+                                "xtype": "",
+                                "items": null
+                            },{
+                                conditionCode:'cu_code',
+                                "text": "客户编号",
+                                "flex": 1,
+                                "dataIndex": "cu_code",
+                                "width": 100,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_name',
+                                "text": "客户名称",
+                                "flex": 1,
+                                "dataIndex": "cu_name",
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                conditionCode:'cu_type',
+                                "text": "客户类型",
+                                "flex": 1,
+                                "dataIndex": "cu_type",
+                                "width": 200,
+                                "xtype": "",
+                                "items": null
+                            }, {
+                                "text": "业务员编号",
+                                "flex": 1,
+                                "dataIndex": "cu_sellercode",
+                                "width": 100
+                            }, {
+                                "text": "业务员",
+                                "flex": 1,
+                                "dataIndex": "cu_sellername",
+                                "width": 100
+                            }, {
+                                "text": "税率",
+                                "flex": 1,
+                                "dataIndex": "cu_taxrate",
+                                "width": 100
+                            }, {
+                                "text": "承付天数",
+                                "flex": 1,
+                                "dataIndex": "cu_promisedays",
+                                "width": 100
+                            }, {
+                                "text": "额度",
+                                "flex": 1,
+                                "dataIndex": "cu_credit",
+                                "width": 100
+                            }, {
+                                "text": "客户地址",
+                                "flex": 1,
+                                "dataIndex": "ca_address",
+                                "width": 250
+                            }]
                     }) ;   
 
                 }
@@ -103,19 +135,54 @@ Ext.define('saas.view.sale.saleout.QueryPanelController', {
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料规格",
-                            "flex": 0,
+                            "text": "规格",
+                            "flex": 1,
                             "dataIndex": "pr_spec",
                             "width": 200,
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料单位",
-                            "flex": 0,
+                            "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
                         }]
                     }) ;   
 

+ 0 - 6
frontend/saas-web/ext/build/ext-all-rtl-debug.js

@@ -206312,12 +206312,6 @@ Ext.define('Ext.form.field.Date', {
             rawDate;
         me.lastValue = me.rawDateText;
         me.lastDate = me.rawDate;
-        //解析后台日期格式为 Y-m-d
-        if(v&&(typeof v) == "string"&&v.indexOf('.')==19&&v.indexOf('T')==10){
-            var d = new Date(v);
-            var times=d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate(); //+ ' ' + d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds(); 
-            v = times;
-        }
         if (Ext.isDate(v)) {
             rawDate = me.rawDate = v;
             me.rawDateText = me.formatDate(v);

+ 2 - 1
frontend/saas-web/resources/json/navigation.json

@@ -221,8 +221,9 @@
             "viewType": "document-kind",
             "leaf": true
         }, {
+            "id":"other-productunit",
             "text": "计量单位",
-            "viewType": "document-kind",
+            "viewType": "other-productunit",
             "leaf": true
         }, {
             "id":"document-kind",

+ 1 - 1
pom.xml

@@ -38,7 +38,7 @@
         <swagger.version>2.7.0</swagger.version>
         <feign.form.version>3.0.3</feign.form.version>
         <commons.fileupload.version>1.3.3</commons.fileupload.version>
-        <docker.repository>192.168.0.181:5000</docker.repository>
+        <docker.repository>192.168.253.3:4000</docker.repository>
         <docker.registry.name>saas</docker.registry.name>
     </properties>