Browse Source

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

hy 7 years ago
parent
commit
537de5d792
42 changed files with 1287 additions and 519 deletions
  1. 1 1
      applications/money/money-server/src/main/resources/mapper/RecbalancedetailMapper.xml
  2. 4 0
      applications/sale/sale-dto/src/main/java/com/usoftchina/saas/sale/dto/SaleDTO.java
  3. 1 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/SaleController.java
  4. 1 1
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/Sale.java
  5. 6 2
      applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java
  6. 2 2
      base-servers/account/account-api/src/main/java/com/usoftchina/saas/account/api/AccountApi.java
  7. 10 2
      base-servers/account/account-dto/src/main/java/com/usoftchina/saas/account/dto/AccountDTO.java
  8. 2 1
      base-servers/account/account-server/src/main/resources/application.yml
  9. 13 2
      base-servers/auth/auth-api/src/main/java/com/usoftchina/saas/auth/api/AuthApi.java
  10. 0 23
      base-servers/auth/auth-api/src/main/java/com/usoftchina/saas/auth/api/TokenApi.java
  11. 10 7
      base-servers/auth/auth-api/src/main/java/com/usoftchina/saas/auth/cache/TokenCache.java
  12. 4 0
      base-servers/auth/auth-dto/pom.xml
  13. 47 0
      base-servers/auth/auth-dto/src/main/java/com/usoftchina/saas/auth/dto/AuthDTO.java
  14. 9 0
      base-servers/auth/auth-server/pom.xml
  15. 58 5
      base-servers/auth/auth-server/src/main/java/com/usoftchina/saas/auth/controller/AuthController.java
  16. 29 7
      base-servers/auth/auth-server/src/main/resources/application.yml
  17. BIN
      base-servers/auth/auth-server/src/main/resources/auth/pub.key
  18. 38 0
      base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/config/AuthFilter.java
  19. 2 3
      base-servers/gateway-server/src/main/resources/application.yml
  20. 1 0
      framework/core/src/main/java/com/usoftchina/saas/exception/ExceptionCode.java
  21. 23 5
      frontend/saas-web/app/util/FormUtil.js
  22. 21 5
      frontend/saas-web/app/view/core/form/FormPanel.js
  23. 2 44
      frontend/saas-web/app/view/core/form/FormPanelController.js
  24. 43 0
      frontend/saas-web/app/view/core/form/field/DetailGridField.js
  25. 19 13
      frontend/saas-web/app/view/money/fundtransfer/FormPanel.js
  26. 32 6
      frontend/saas-web/app/view/money/fundtransfer/FormPanelController.js
  27. 80 28
      frontend/saas-web/app/view/money/othreceipts/FormPanelController.js
  28. 80 28
      frontend/saas-web/app/view/money/othreceipts/QueryPanelController.js
  29. 49 18
      frontend/saas-web/app/view/money/othspendings/FormPanelController.js
  30. 45 14
      frontend/saas-web/app/view/money/othspendings/QueryPanelController.js
  31. 1 1
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  32. 146 67
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  33. 74 37
      frontend/saas-web/app/view/sale/sale/QueryPanelController.js
  34. 5 1
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  35. 112 44
      frontend/saas-web/app/view/sale/saleIn/FormPanelController.js
  36. 5 3
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  37. 71 36
      frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js
  38. 3 0
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  39. 132 68
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  40. 2 1
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  41. 104 37
      frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js
  42. 0 6
      frontend/saas-web/ext/build/ext-all-rtl-debug.js

+ 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

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

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

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

+ 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


+ 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, "邮箱已注册"),

+ 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

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

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

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

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

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

+ 1 - 1
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 : "物料编号", 

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

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

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

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

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

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

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

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

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