Browse Source

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

rainco 7 years ago
parent
commit
20ee42efb5
37 changed files with 1054 additions and 160 deletions
  1. 2 2
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MaxnumberService.java
  2. 8 8
      applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MessageLogService.java
  3. 3 1
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java
  4. 0 19
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/CommonsController.java
  5. 0 3
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/MaxnumberController.java
  6. 2 0
      applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/MessageLogController.java
  7. 2 2
      applications/commons/commons-server/src/main/resources/application.yml
  8. 64 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomerDTO.java
  9. 19 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomerFormDTO.java
  10. 33 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomeraddressDTO.java
  11. 33 0
      applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomercontactDTO.java
  12. 1 1
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/CustomerList.java
  13. 45 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerController.java
  14. 8 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerService.java
  15. 45 2
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java
  16. 29 82
      applications/document/document-server/src/main/resources/mapper/CustomerListMapper.xml
  17. 0 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseListMapper.java
  18. 85 1
      applications/sale/sale-server/pom.xml
  19. 47 0
      frontend/saas-web/app/view/core/baseform/FormPanel.js
  20. 168 0
      frontend/saas-web/app/view/core/baseform/FormPanelController.js
  21. 4 0
      frontend/saas-web/app/view/core/baseform/FormPanelModel.js
  22. 145 0
      frontend/saas-web/app/view/core/baseform/GridPanel.js
  23. 1 3
      frontend/saas-web/app/view/core/dbfind/DbfindGridPanel.js
  24. 1 2
      frontend/saas-web/app/view/core/dbfind/MultiDbfindGridPanel.js
  25. 3 1
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  26. 7 3
      frontend/saas-web/app/view/core/tab/Controller.js
  27. 124 0
      frontend/saas-web/app/view/document/customer/FormPanel.js
  28. 11 0
      frontend/saas-web/app/view/document/customer/FormPanelController.js
  29. 4 0
      frontend/saas-web/app/view/document/customer/FormPanelModel.js
  30. 3 3
      frontend/saas-web/app/view/document/kind/ChildForm.js
  31. 5 12
      frontend/saas-web/app/view/document/kind/Kind.js
  32. 8 5
      frontend/saas-web/app/view/document/kind/KindModel.js
  33. 124 0
      frontend/saas-web/app/view/document/vendor/FormPanel.js
  34. 11 0
      frontend/saas-web/app/view/document/vendor/FormPanelController.js
  35. 4 0
      frontend/saas-web/app/view/document/vendor/FormPanelModel.js
  36. 3 2
      frontend/saas-web/overrides/i18n.js
  37. 2 2
      frontend/saas-web/resources/json/navigation.json

+ 2 - 2
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MaxnumberService.java

@@ -18,7 +18,7 @@ public interface MaxnumberService {
      * @Author: guq
      * @Date: 2018/10/19 api/commons
      */
-    @PostMapping("/number/pushMaxnubmer")
+    @PostMapping("/api/commons/number/pushMaxnubmer")
     public Result<String> pushMaxnubmer(@RequestParam("count") Integer count,@RequestParam("code") String code,
                                 @RequestParam("caller") String caller);
     /**
@@ -28,6 +28,6 @@ public interface MaxnumberService {
      * @Author: guq
      * @Date: 2018/10/22
      */
-    @PostMapping("/getMaxnumber")
+    @PostMapping("/api/commons/numnber/getMaxnumber")
     public Result<String> getMaxnumber(@RequestParam("caller") String caller, @RequestParam("update") boolean update);
 }

+ 8 - 8
applications/commons/commons-api/src/main/java/com/usoftchina/saas/commons/api/MessageLogService.java

@@ -13,27 +13,27 @@ import org.springframework.web.bind.annotation.RequestMapping;
 @FeignClient("commons-server")
 public interface MessageLogService {
 
-    @RequestMapping("/save")
+    @RequestMapping("/api/commons/messagelog/save")
     public void save(@RequestBody DocBaseDTO baseDTO);
 
-    @RequestMapping("/update")
+    @RequestMapping("/api/commons/messagelog/update")
     public void update(@RequestBody DocBaseDTO baseDTO);
 
-    @RequestMapping("/delete")
+    @RequestMapping("/api/commons/messagelog/delete")
     public void delete(@RequestBody DocBaseDTO baseDTO);
 
-    @RequestMapping("/deleteDetail")
+    @RequestMapping("/api/commons/messagelog/deleteDetail")
     public void deleteDetail(@RequestBody DocBaseDTO baseDTO);
 
-    @RequestMapping("/audit")
+    @RequestMapping("/api/commons/messagelog/audit")
     public void audit(@RequestBody DocBaseDTO baseDTO);
 
-    @RequestMapping("/unAudit")
+    @RequestMapping("/api/commons/messagelog/unAudit")
     public void unAudit(@RequestBody DocBaseDTO baseDTO);
 
-    @RequestMapping("/close")
+    @RequestMapping("/api/commons/messagelog/close")
     public void close(@RequestBody DocBaseDTO baseDTO);
 
-    @RequestMapping("/open")
+    @RequestMapping("/api/commons/messagelog/open")
     public void open(@RequestBody DocBaseDTO baseDTO);
 }

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

@@ -26,7 +26,9 @@ public enum BizExceptionCode implements BaseExceptionCode {
     //采购
 
     //销售
-
+    SALE_ALL_TURNOUT(72000, "该销售单已全部转出货,无法转出货单"),
+    SALE_CLOSE(72001, "单据已关闭,无法进行操作"),
+    SALE_YQTYBEYONDQTY(72001, "明细行已转数量大于数量");
     //资金
 
     //库存

+ 0 - 19
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/CommonsController.java

@@ -1,19 +0,0 @@
-package com.usoftchina.saas.commons.controller;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @author: guq
- * @create: 2018-10-18 15:53
- **/
-@RestController
-@RequestMapping("/commons")
-public class CommonsController {
-
-    @RequestMapping("/test")
-    public String test() {
-        return "TEST";
-    }
-
-}

+ 0 - 3
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/controller/MaxnumberController.java

@@ -10,9 +10,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.HashMap;
-import java.util.Map;
-
 /**
  * @author: guq
  * @create: 2018-10-18 17:40

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

@@ -5,12 +5,14 @@ import com.usoftchina.saas.commons.service.MessageLogService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * @author: guq
  * @create: 2018-10-20 11:46
  **/
 @RequestMapping("/messagelog")
+@RestController
 public class MessageLogController {
 
     @Autowired

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

@@ -23,8 +23,8 @@ spring:
     host: 192.168.0.176
     port: 5672
     virtual-host: dev
-    password: saas
-    username: select123***
+    username: saas
+    password: select123***
   zipkin:
     sender:
       type: rabbit

+ 64 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomerDTO.java

@@ -0,0 +1,64 @@
+package com.usoftchina.saas.document.dto;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Created by zdw
+ * 2018-10-23 17:21.
+ */
+@Data
+public class CustomerDTO extends CommonBaseEntity implements Serializable {
+    private String cu_code;
+
+    private String cu_name;
+
+    private String cu_uu;
+
+    private String cu_type;
+
+    private Date cu_begindate;
+
+    private Double cu_beginaramount;
+
+    private Double cu_beginprerecamount;
+
+    private Double cu_promisedays;
+
+    private Double cu_taxrate;
+
+    private Integer cu_sellerid;
+
+    private String cu_sellercode;
+
+    private String cu_sellername;
+
+    private Double cu_credit;
+
+    private String cu_status;
+
+    private String cu_statuscode;
+
+    private Integer cu_recordmanid;
+
+    private String cu_recordman;
+
+    private Date cu_recorddate;
+
+    private String cu_text1;
+
+    private String cu_text2;
+
+    private String cu_text3;
+
+    private String cu_text4;
+
+    private String cu_text5;
+
+    private Double cu_leftamount;
+
+    private Double cu_recamount;
+}

+ 19 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomerFormDTO.java

@@ -0,0 +1,19 @@
+package com.usoftchina.saas.document.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * Created by zdw
+ * 2018-10-23 17:26.
+ */
+@Data
+public class CustomerFormDTO implements Serializable {
+
+    private CustomerDTO main;
+    private List<CustomercontactDTO> items1;
+    private List<CustomeraddressDTO> items2;
+
+}

+ 33 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomeraddressDTO.java

@@ -0,0 +1,33 @@
+package com.usoftchina.saas.document.dto;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class CustomeraddressDTO extends CommonBaseEntity implements Serializable {
+
+    private Long ca_cuid;
+
+    private Integer ca_detno;
+
+    private String ca_person;
+
+    private Integer ca_phone;
+
+    private Integer ca_default;
+
+    private String ca_text1;
+
+    private String ca_text2;
+
+    private String ca_text3;
+
+    private String ca_text4;
+
+    private String ca_text5;
+
+    private String ca_address;
+
+}

+ 33 - 0
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/CustomercontactDTO.java

@@ -0,0 +1,33 @@
+package com.usoftchina.saas.document.dto;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class CustomercontactDTO extends CommonBaseEntity implements Serializable {
+
+    private Long cc_cuid;
+
+    private Integer cc_detno;
+
+    private String cc_name;
+
+    private Integer cc_tel;
+
+    private String cc_qq;
+
+    private String cc_email;
+
+    private String cc_text1;
+
+    private String cc_text2;
+
+    private String cc_text3;
+
+    private String cc_text4;
+
+    private String cc_text5;
+
+}

+ 1 - 1
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/CustomerList.java

@@ -85,7 +85,7 @@ public class CustomerList extends CommonBaseEntity{
     private String ca_text5;
 
     private String ca_address;
-//    Customercontact
+//    CustomercontactDTO
 
     private Long cc_cuid;
 

+ 45 - 4
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerController.java

@@ -2,14 +2,14 @@ package com.usoftchina.saas.document.controller;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.document.dto.CustomerFormDTO;
 import com.usoftchina.saas.document.entities.CustomerList;
 import com.usoftchina.saas.document.service.CustomerService;
 import com.usoftchina.saas.page.PageRequest;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * Created by zdw
@@ -24,7 +24,7 @@ public class CustomerController {
     private CustomerService customerService;
 
     /**
-     * 采购订单列表
+     * 客户资料列表
      *
      * @param page
      * @param req
@@ -36,6 +36,47 @@ public class CustomerController {
         return Result.success(listData);
     }
 
+    /**
+     * 获取客户资料表单
+     *
+     * @return
+     */
+    @GetMapping("/read/{id}")
+    public Result<CustomerFormDTO> getFormData(@PathVariable("id") Long id) {
+        CustomerFormDTO data = customerService.getFormData(id);
+        return Result.success(data);
+    }
+
+    /**
+     * 客户资料表单保存
+     *
+     * @param
+     * @return
+     */
+    @PostMapping("/save")
+    public Result<DocBaseDTO> saveFormData(@RequestBody CustomerFormDTO data) {
+        DocBaseDTO save = customerService.saveFormData(data);
+        return Result.success(save);
+    }
+
+    /**
+     * 客户资料删除
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id) {
+        customerService.delete(id);
+        return Result.success();
+    }
+
+
+
+
+
+
+
 
 
 

+ 8 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerService.java

@@ -2,7 +2,9 @@ package com.usoftchina.saas.document.service;
 
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
+import com.usoftchina.saas.document.dto.CustomerFormDTO;
 import com.usoftchina.saas.document.entities.Customer;
 import com.usoftchina.saas.document.entities.CustomerList;
 import com.usoftchina.saas.document.mapper.CustomerMapper;
@@ -14,4 +16,10 @@ import com.usoftchina.saas.page.PageRequest;
  */
 public interface CustomerService extends CommonBaseService<CustomerMapper, Customer> {
     PageInfo<CustomerList> getListData(PageRequest page, ListReqDTO req);
+
+    CustomerFormDTO getFormData(Long id);
+
+    DocBaseDTO saveFormData(CustomerFormDTO data);
+
+    void delete(Long id);
 }

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

@@ -3,14 +3,20 @@ package com.usoftchina.saas.document.service.impl;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.dto.CustomerDTO;
+import com.usoftchina.saas.document.dto.CustomerFormDTO;
 import com.usoftchina.saas.document.entities.Customer;
 import com.usoftchina.saas.document.entities.CustomerList;
 import com.usoftchina.saas.document.mapper.CustomerListMapper;
 import com.usoftchina.saas.document.mapper.CustomerMapper;
+import com.usoftchina.saas.document.mapper.CustomeraddressMapper;
+import com.usoftchina.saas.document.mapper.CustomercontactMapper;
 import com.usoftchina.saas.document.service.CustomerService;
 import com.usoftchina.saas.page.PageRequest;
+import com.usoftchina.saas.utils.BeanMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
@@ -27,6 +33,15 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
     @Autowired
     private CustomerListMapper customerListMapper;
 
+    @Autowired
+    private CustomercontactMapper customercontactMapper;
+
+    @Autowired
+    private CustomeraddressMapper customeraddressMapper;
+
+
+
+
     @Override
     public PageInfo<CustomerList> getListData(PageRequest page, ListReqDTO req) {
         //设置默认分页
@@ -43,6 +58,34 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         return pageInfo;
     }
 
+    @Override
+    public CustomerFormDTO getFormData(Long id) {
+        if (null == id || "0".equals(id)) {
+            return null;
+        }
+        CustomerFormDTO purchaseFormDTO = new CustomerFormDTO();
+        //查询主表信息
+        Customer customer = getMapper().selectByPrimaryKey(id);
+        //将Customer实体对象转化成传输对象
+        CustomerDTO main = BeanMapper.map(customer, CustomerDTO.class);
+        //查询从表
+//        List<PurchaseDetail> purchaseDetails = purchasedetailMapper.selectByFK(id);
+//        List<PurchaseDetailDTO> items = BeanMapper.mapList(purchaseDetails, PurchaseDetailDTO.class);
+//        purchaseFormDTO.setMain(main);
+//        purchaseFormDTO.setItems(items);
+        return purchaseFormDTO;
+    }
+
+    @Override
+    public DocBaseDTO saveFormData(CustomerFormDTO data) {
+        return null;
+    }
+
+    @Override
+    public void delete(Long id) {
+
+    }
+
     private List<CustomerList> getListByMode(ListReqDTO req) {
         List<CustomerList> list = null;
         Long companyId = BaseContextHolder.getCompanyId();
@@ -51,9 +94,9 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
             con = "1=1";
         }
         if (null == req || StringUtils.isEmpty(req.getMode()) || "MAIN".equals(req.getMode())) {
-            list = customerListMapper.selectPurchaseBycondition(con, companyId);
+            list = customerListMapper.selectCustomerListByCondition(con, companyId);
         } else {
-            list = customerListMapper.selectPurchaseListByCondition(con, companyId);
+            list = customerListMapper.selectCustomerBycondition(con, companyId);
         }
         return list;
     }

+ 29 - 82
applications/document/document-server/src/main/resources/mapper/CustomerListMapper.xml

@@ -2,104 +2,51 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.usoftchina.saas.document.mapper.CustomerListMapper">
   <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.CustomerList">
-    <id column="pi_id" jdbcType="INTEGER" property="id" />
-    <result column="pi_inoutno" jdbcType="VARCHAR" property="pi_inoutno" />
-    <result column="pi_class" jdbcType="VARCHAR" property="pi_class" />
-    <result column="pi_date" jdbcType="TIMESTAMP" property="pi_date" />
-    <result column="pi_vendid" jdbcType="INTEGER" property="pi_vendid" />
-    <result column="pi_vendcode" jdbcType="VARCHAR" property="pi_vendcode" />
-    <result column="pi_vendname" jdbcType="VARCHAR" property="pi_vendname" />
-    <result column="pi_custid" jdbcType="INTEGER" property="pi_custid" />
-    <result column="pi_custcode" jdbcType="VARCHAR" property="pi_custcode" />
-    <result column="pi_custname" jdbcType="VARCHAR" property="pi_custname" />
-    <result column="pi_puid" jdbcType="INTEGER" property="pi_puid" />
-    <result column="pi_pucode" jdbcType="VARCHAR" property="pi_pucode" />
-    <result column="pi_said" jdbcType="INTEGER" property="pi_said" />
-    <result column="pi_sacode" jdbcType="VARCHAR" property="pi_sacode" />
-    <result column="pi_total" jdbcType="DOUBLE" property="pi_total" />
-    <result column="pi_recordmanid" jdbcType="INTEGER" property="pi_recordmanid" />
-    <result column="pi_recordman" jdbcType="VARCHAR" property="pi_recordman" />
-    <result column="pi_recorddate" jdbcType="TIMESTAMP" property="pi_recorddate" />
-    <result column="pi_status" jdbcType="VARCHAR" property="pi_status" />
-    <result column="pi_statuscode" jdbcType="VARCHAR" property="pi_statuscode" />
-    <result column="pi_printstatus" jdbcType="VARCHAR" property="pi_printstatus" />
-    <result column="pi_printstatuscode" jdbcType="VARCHAR" property="pi_printstatuscode" />
-    <result column="pi_text1" jdbcType="VARCHAR" property="pi_text1" />
-    <result column="pi_text2" jdbcType="VARCHAR" property="pi_text2" />
-    <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
-    <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
-    <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
-    <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
-    <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
-    <result column="pd_inoutno" jdbcType="VARCHAR" property="pd_inoutno" />
-    <result column="pd_piclass" jdbcType="VARCHAR" property="pd_piclass" />
-    <result column="pd_pdno" jdbcType="INTEGER" property="pd_pdno" />
-    <result column="pd_ordercode" jdbcType="VARCHAR" property="pd_ordercode" />
-    <result column="pd_orderdetno" jdbcType="INTEGER" property="pd_orderdetno" />
-    <result column="pd_prodid" jdbcType="INTEGER" property="pd_prodid" />
-    <result column="pd_prodcode" jdbcType="VARCHAR" property="pd_prodcode" />
-    <result column="pd_unit" jdbcType="VARCHAR" property="pd_unit" />
-    <result column="pd_inqty" jdbcType="INTEGER" property="pd_inqty" />
-    <result column="pd_outqty" jdbcType="INTEGER" property="pd_outqty" />
-    <result column="pd_orderprice" jdbcType="DOUBLE" property="pd_orderprice" />
-    <result column="pd_sendprice" jdbcType="DOUBLE" property="pd_sendprice" />
-    <result column="pd_price" jdbcType="DOUBLE" property="pd_price" />
-    <result column="pd_total" jdbcType="DOUBLE" property="pd_total" />
-    <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
-    <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
-    <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
-    <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
-    <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
-    <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
-    <result column="pd_inwhid" jdbcType="INTEGER" property="pd_inwhid" />
-    <result column="pd_inwhcode" jdbcType="VARCHAR" property="pd_inwhcode" />
-    <result column="pd_inwhname" jdbcType="VARCHAR" property="pd_inwhname" />
-    <result column="pd_orderid" jdbcType="INTEGER" property="pd_orderid" />
-    <result column="pd_sdid" jdbcType="INTEGER" property="pd_sdid" />
-    <result column="pd_status" jdbcType="INTEGER" property="pd_status" />
-    <result column="companyid" jdbcType="INTEGER" property="companyId" />
-    <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
-    <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
-    <result column="pd_text1" jdbcType="VARCHAR" property="pd_text1" />
-    <result column="pd_text2" jdbcType="VARCHAR" property="pd_text2" />
-    <result column="pd_text3" jdbcType="VARCHAR" property="pd_text3" />
-    <result column="pd_text4" jdbcType="VARCHAR" property="pd_text4" />
-    <result column="pd_text5" jdbcType="VARCHAR" property="pd_text5" />
-    <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
-    <result column="pd_yqty" jdbcType="INTEGER" property="pd_yqty" />
-    <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
+    <id column="cc_id" jdbcType="INTEGER" property="id" />
+    <result column="cc_cuid" jdbcType="INTEGER" property="cc_cuid" />
+    <result column="cc_detno" jdbcType="INTEGER" property="cc_detno" />
+    <result column="cc_name" jdbcType="VARCHAR" property="cc_name" />
+    <result column="cc_tel" jdbcType="INTEGER" property="cc_tel" />
+    <result column="cc_qq" jdbcType="VARCHAR" property="cc_qq" />
+    <result column="cc_email" jdbcType="VARCHAR" property="cc_email" />
+    <result column="ca_cuid" jdbcType="INTEGER" property="ca_cuid" />
+    <result column="ca_detno" jdbcType="INTEGER" property="ca_detno" />
+    <result column="ca_person" jdbcType="VARCHAR" property="ca_person" />
+    <result column="ca_phone" jdbcType="INTEGER" property="ca_phone" />
+    <result column="ca_default" jdbcType="INTEGER" property="ca_default" />
+    <result column="cc_cuid" jdbcType="INTEGER" property="cc_cuid" />
+    <result column="cc_detno" jdbcType="INTEGER" property="cc_detno" />
+    <result column="cc_name" jdbcType="VARCHAR" property="cc_name" />
+    <result column="cc_tel" jdbcType="INTEGER" property="cc_tel" />
+    <result column="cc_qq" jdbcType="VARCHAR" property="cc_qq" />
+    <result column="cc_email" jdbcType="VARCHAR" property="cc_email" />
 
   </resultMap>
 
 
-  <select id="selectCustomerListByCondition" parameterType="string" resultMap="BaseResultMap">
-    select  *  from purchase left join purchasedetail on pu_id=pd_puid
+  <select id="selectCustomerListByCondition"  resultMap="BaseResultMap">
+    select  *  from customer left join customeraddress on cu_id=ca_cuid left join customercontact on cu_id = cc_cuid
     <where>
       <if test="con != null">
         ${con}
       </if>
       <if test="companyId != null">
-        and   companyId = #{companyId}
+        and   companyid = #{companyId}
       </if>
-    </where>  order by pu_id,pd_detno
+    </where>  order by cu_id
   </select>
 
-  <select id="selectCustomerBycondition" parameterType="string" resultMap="BaseResultMap">
-    select  *  from prodinout
+  <select id="selectCustomerBycondition"  resultMap="BaseResultMap">
+    select  *  from customer
     <where>
-      <if test="begin != null">
-        pu_date &gt;= ${begin}
-      </if>
-      <if test="end!= null">
-        AND  pu_date &lt;= ${end}
-      </if>
-      <if test="status != null">
-        AND pu_status=${status}
+      <if test="con != null">
+        ${con}
       </if>
-      <if test="keyword != null">
-        AND ${keyword}
+      <if test="companyId != null">
+        and  companyid = #{companyId}
       </if>
     </where>
+    order by cu_id
   </select>
 
 

+ 0 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseListMapper.java

@@ -1,7 +1,5 @@
 package com.usoftchina.saas.purchase.mapper;
 
-import com.usoftchina.saas.commons.dto.ListReqDTO;
-import com.usoftchina.saas.purchase.dto.PurchaseReqDTO;
 import com.usoftchina.saas.purchase.po.PurchaseList;
 import org.apache.ibatis.annotations.Param;
 

+ 85 - 1
applications/sale/sale-server/pom.xml

@@ -10,12 +10,96 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>sale-server</artifactId>
+    
     <dependencies>
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>sale-dto</artifactId>
         </dependency>
-    </dependencies>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>storage-dto</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>purchase-dto</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>document-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>auth-client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>server-starter</artifactId>
+        </dependency>
+
+        <!--test-->
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>test-starter</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- db -->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</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>
+        </dependency>
 
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+        </dependency>
+        <!-- feign -->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>commons-dto</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>commons-api</artifactId>
+        </dependency>
+    </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>

+ 47 - 0
frontend/saas-web/app/view/core/baseform/FormPanel.js

@@ -0,0 +1,47 @@
+Ext.define('saas.view.core.baseform.FormPanel', {
+    extend: 'Ext.form.Panel',
+    xtype: 'core-baseform-formpanel',
+    controller: 'core-baseform-formpanel',
+    viewModel: 'core-baseform-formpanel',
+
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+
+    //基础属性
+    layout: 'column',
+    autoScroll: true,
+    border: 1,
+    bodyPadding: 5,
+    searchField:[],
+
+    fieldDefaults: {
+        margin: '0 5 5 0',
+        labelAlign: 'right',
+        labelWidth: 90,
+        columnWidth: 0.25,
+        blankText: '该字段不能为空'
+    },
+
+    initComponent: function() {
+
+        var me = this;
+
+        Ext.apply(me, {
+            dockedItems: [{
+                xtype: 'toolbar',
+                dock: 'top',
+                style: {
+                    'border-bottom': '1px solid #35baf6 !important'
+                },
+                items: me.searchField.concat([{
+                    cls:'x-formpanel-btn-orange',
+                    xtype: 'button',
+                    text: '查询',
+                    handler: 'query'
+                }])
+            }]
+        });
+        me.callParent(arguments);
+    }
+});

+ 168 - 0
frontend/saas-web/app/view/core/baseform/FormPanelController.js

@@ -0,0 +1,168 @@
+Ext.define('saas.view.core.baseform.FormPanelController', {
+    extend: 'Ext.app.ViewController',
+    alias: 'controller.core-baseform-formpanel',
+
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+    FormUtil: Ext.create('saas.util.FormUtil'),
+
+    auditBtnClick: function() {
+        var me = this,
+        form = me.getView(),
+        statusCodeField = form._statusCodeField,
+        viewModel = me.getViewModel(),
+        status = viewModel.get(statusCodeField);
+
+        status == 'AUDITED' ? me.unAudit() : me.audit();
+    },
+
+    add: function(){
+        var form = this.getView();
+        var id = form.xtype + '_add';
+        openTab(form.xtype,'新增' + form._title,id);
+    },
+    
+    delete: function(){
+        var me = this;
+        var form = this.getView();
+        var id = form.getForm().findField(form._idField);
+        var code = form.getForm().findField(form._codeField);
+        if(id&&id.value!=0){
+            me.BaseUtil.request({
+                url: form._deleteUrl+id.value,
+                method: 'GET',
+            })
+            .then(function(res) {
+                var localJson = new Ext.decode(res.responseText);
+                if(localJson.success){
+                    var mainTab = Ext.getCmp('main-tab-panel');
+                    mainTab.getActiveTab().close();
+                    //解析参数
+                    Ext.Msg.alert('提示','删除成功');
+                }
+            })
+            .catch(function() {
+                Ext.Msg.alert('提示','删除失败');
+            });
+        }
+    },
+
+    onSave: function() {
+        var me = this,
+        form = this.getView(),
+        viewModel = me.getViewModel(),
+        modelData = viewModel.getData(),
+        detailBindFields = modelData._detailBindFields;
+
+        if(form.getForm().wasDirty==false){
+            Ext.Msg.alert('提示','未修改数据,请修改后保存');
+            return false;
+        }
+        if(form.getForm().wasValid==false){
+            Ext.Msg.alert('提示','表单校验有误,请检查');
+            return false;
+        }
+        //form里面数据
+        var formData = form.getFormData();
+        
+        me.save(formData);
+    },
+
+    save:function(formData){
+        var me = this,
+        form = this.getView(),
+        viewModel = me.getViewModel(),
+        modelData = viewModel.getData(),
+        detailBindFields = modelData._detailBindFields;
+
+        var gridData = formData.detail?formData.detail:[];
+        var dirtyGridData = [];
+        if(gridData.length>0){
+            Ext.each(gridData, function(item,index){
+                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);
+                }
+            });
+        }
+        var params = {
+            main:formData.main,
+            items:dirtyGridData
+        }
+        me.BaseUtil.request({
+            url: form._saveUrl,
+            params: JSON.stringify(params),
+            method: 'POST',
+        })
+        .then(function(res) {
+            var localJson = new Ext.decode(res.responseText);
+            if(localJson.success){
+                Ext.Msg.alert('提示','保存成功');
+                form.initId = localJson.data.id;
+                form.FormUtil.loadData(form);
+            }
+        })
+        .catch(function() {
+            Ext.Msg.alert('提示','保存失败');
+        });
+    },
+
+    audit: function(){
+        var me = this;
+        var form = this.getView();
+        if(form.getForm().wasDirty==false){
+            Ext.Msg.alert('提示','未修改数据,请修改后保存');
+            return false;
+        }
+        if(form.getForm().wasValid==false){
+            Ext.Msg.alert('提示','表单校验有误,请检查');
+            return false;
+        }
+        //form里面数据
+        var formData = form.getFormData();
+        var gridData = formData.detail?formData.detail:[];
+        var dirtyGridData = [];
+        if(gridData.length>0){
+            Ext.each(gridData, function(item,index){
+                if(item.dirty){
+                    if((typeof item.data.id) != "number" && item.data.id.indexOf('extMode')>-1){
+                        item.data.id = 0;
+                    }
+                    dirtyGridData.push(item.data)
+                }
+            });
+        }   
+        var params = {
+            main:formData.main,
+            items:dirtyGridData
+        }
+        me.BaseUtil.request({
+            url: form._auditUrl,
+            params: JSON.stringify(params),
+            method: 'POST',
+        })
+        .then(function(res) {
+            var localJson = new Ext.decode(res.responseText);
+            if(localJson.success){
+                Ext.Msg.alert('提示','审核成功');
+                form.initId = localJson.data.id;
+                form.FormUtil.loadData(form);
+            }
+        })
+        .catch(function() {
+            Ext.Msg.alert('提示','审核失败');
+        });
+    },
+    unAudit: function() {
+        console.log('反审核');
+        return;
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/core/baseform/FormPanelModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.core.baseform.FormPanelModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.core-baseform-formpanel',
+});

+ 145 - 0
frontend/saas-web/app/view/core/baseform/GridPanel.js

@@ -0,0 +1,145 @@
+Ext.define('saas.view.core.baseform.GridPanel', {
+    extend: 'Ext.grid.Panel',
+    xtype: 'core-baseform-gridpanel',
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+    dataUrl: '',
+    dbSearchFields: [],
+    condition:'',
+    frame:true,
+
+    initComponent: function() {
+        var me = this;
+        if(me.columns){
+            var fields = me.columns.map(column => column.dataIndex);
+            me.store = Ext.create('Ext.data.Store',{
+                fields:fields,
+                autoLoad: true,
+                pageSize: 6,
+                data: [],
+                proxy: {
+                    type: 'ajax',
+                    url: me.dataUrl,
+                    actionMethods: {
+                        read: 'GET'
+                    },
+                    reader: {
+                        type: 'json',
+                        rootProperty: 'data.list',
+                        totalProperty: 'data.total',
+                    }
+                },
+                listeners: {
+                    beforeload: function (store, op) {
+                        var condition = me.condition;
+                        if (Ext.isEmpty(condition)) {
+                            condition = " 1=1 ";
+                        }
+                        Ext.apply(store.proxy.extraParams, {
+                            number: op._page,
+                            size: store.pageSize,
+                            keyword: condition
+                        });
+                    }
+                }
+            });
+
+            Ext.apply(me, {
+                dockedItems:[{
+                    xtype:'toolbar',
+                    dock:'top',
+                    items:['->',{
+                        xtype:'button',
+                        text:'新增',
+                        handler:function(b){
+                        }
+                    }, {
+                        text: '导入',
+                        handler: me.onImport,
+                        menu: {
+                            width: 80,
+                            items: [{
+                                text:'导出',
+                                handler:function(){
+                                    me.onExport(this)
+                                }
+                            }],
+                            listeners: {
+                                'mouseleave':function(enu){
+                                    this.hide();
+                                } 
+                            }
+                        }
+                    },{
+                        text: '禁用',
+                        handler: me.onCloseOrder,
+                        menu: {
+                            width: 80,
+                            items: [{
+                                text:'启用',
+                                handler:function(){
+                                    me.onOpenOrder(this)
+                                }
+                            }],
+                            listeners: {
+                                'mouseleave':function(enu){
+                                    this.hide();
+                                } 
+                            }
+                        }
+                    }, {
+                        text: '删除',
+                        handler: me.onDelete
+                    }, {
+                        text: '刷新',
+                        handler: me.onLoad
+                    }]
+                },{
+                    xtype: 'pagingtoolbar',
+                    dock: 'bottom',
+                    displayInfo: true,
+                    emptyMsg: "暂无数据",
+                    store: me.store,
+                    displayMsg: '显示{0}到{1}条数据,共有{2}条',
+                    beforePageText: "当前第",
+                    afterPageText: "页,共{0}页"
+                }]
+            });
+        }
+        me.callParent(arguments);
+    },
+
+    loadData: function(grid, url) {
+        this.BaseUtil.request({url})
+        .then(function(response) {
+            var data = Ext.decode(response.responseText);
+                grid.getStore().loadData(data.data);
+                grid.fireEvent('afterLoadData', grid, data.data);
+                grid.setLoading(false);
+        })
+        .catch(function(response) {
+            // something...
+        });
+    },
+
+    listeners:{
+        afterrender:function(grid){
+            if(grid.dataUrl){
+                grid.setLoading(true);
+                grid.loadData(grid, grid.dataUrl);
+            }
+        }
+    },
+
+    getCondition: function(f,conditionExpression){
+        var condition = '';
+        if((f.xtype == 'checkbox' || f.xtype == 'radio')&&f.logic){
+            
+        }else if(f.xtype=='textfield'&&f.value!=''){
+            condition=conditionExpression.replace(new RegExp("\\{0}","g"), f.value);
+        }
+        if(condition.length>0){
+            condition+= ' AND ';
+        }
+        return condition;
+    }
+});

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

@@ -17,6 +17,7 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
                 data: [],
                 proxy: {
                     type: 'ajax',
+                    timeout:8000,
                     url: me.dataUrl,
                     actionMethods: {
                         read: 'GET'
@@ -88,7 +89,6 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
             var data = Ext.decode(response.responseText);
                 grid.getStore().loadData(data.data);
                 grid.fireEvent('afterLoadData', grid, data.data);
-                grid.setLoading(false);
         })
         .catch(function(response) {
             // something...
@@ -98,13 +98,11 @@ Ext.define('saas.view.core.dbfind.DbfindGridPanel', {
     listeners:{
         afterrender:function(grid){
             if(grid.dataUrl){
-                grid.setLoading(true);
                 grid.loadData(grid, grid.dataUrl);
             }
         },
         itemClick: function(view,record) {
             var me = this;
-            debugger;
             var dbfinds = me.dbfinds;
             if(dbfinds&&dbfinds.length>0){
                 if(me.belong=='grid'){

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

@@ -47,6 +47,7 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
                 proxy: {
                     type: 'ajax',
                     url: me.dataUrl,
+                    timeout:8000,
                     actionMethods: {
                         read: 'GET'
                     },
@@ -260,7 +261,6 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
             var data = Ext.decode(response.responseText);
                 grid.getStore().loadData(data.data);
                 grid.fireEvent('afterLoadData', grid, data.data);
-                grid.setLoading(false);
         })
         .catch(function(response) {
             // something...
@@ -270,7 +270,6 @@ Ext.define('saas.view.core.dbfind.MultiDbfindGridPanel', {
     listeners:{
         afterrender:function(grid){
             if(grid.dataUrl){
-                grid.setLoading(true);
                 grid.loadData(grid, grid.dataUrl);
             }
         }//,

+ 3 - 1
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -189,7 +189,9 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
             idValue = record.get(grid.idField),
             codeValue = record.get(grid.codeField),
             id = grid.xtype + idValue;
-            openTab(grid.addXtype,grid.addTitle+"("+codeValue+")",id);
+            openTab(grid.addXtype,grid.addTitle+"("+codeValue+")",id, {
+                initId: idValue
+            });
         }
     },
     getFields: function() {

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

@@ -5,11 +5,15 @@ Ext.define('saas.view.core.tab.Controller', {
     init: function() {
         var me = this,
         tab = me.getView(),
-        viewType = tab.viewType;
+        viewType = tab.viewType,
+        viewConfig = tab.viewConfig;
 
-        tab.add({
+        var view = {
             xtype: viewType
-        });
+        };
+        Ext.apply(view, viewConfig);
+
+        tab.add(view);
     },
 
 });

+ 124 - 0
frontend/saas-web/app/view/document/customer/FormPanel.js

@@ -0,0 +1,124 @@
+Ext.define('saas.view.document.customer.FormPanel', {
+    extend: 'saas.view.core.baseform.FormPanel',
+    xtype: 'document-customer-formpanel',
+    controller: 'document-customer-formpanel',
+    viewModel: 'document-customer-formpanel',
+
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+
+    //基础属性
+    layout: 'fit',
+    autoScroll: true,
+    border: 1,
+    bodyPadding: 5,
+
+    fieldDefaults: {
+        margin: '0 5 5 0',
+        labelAlign: 'right',
+        labelWidth: 90,
+        blankText: '该字段不能为空'
+    },
+
+    //字段属性
+    _title:'客户管理',
+    _dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+    _saveUrl:'http://192.168.253.228:8800/api/document/vendor/save',
+    _deleteUrl:'http://192.168.253.228:8800/api/document/vendor/delete',
+
+    initComponent: function () {
+        var me = this;
+        Ext.apply(me, {
+            items: [{
+                name : "vendorGrid", 
+                xtype : "core-baseform-gridpanel", 
+                layout:'fit',
+                dataUrl:me._dataUrl,
+                columns : [
+                    {
+                        text : "序号", 
+                        dataIndex : "pd_detno", 
+                        width : 100, 
+                        xtype : "numbercolumn",
+                        align : 'center',
+                        format:'0',
+                        summaryType: 'count',
+                        summaryRenderer: function(value, summaryData, dataIndex) {
+                            return Ext.String.format('合计: {0}条', value);
+                        },
+                    }, 
+                    {
+                        editor : {
+                            displayField : "display", 
+                            editable : true, 
+                            format : "", 
+                            hideTrigger : false, 
+                            maxLength : 100.0, 
+                            minValue : null, 
+                            positiveNum : false, 
+                            queryMode : "local", 
+                            store : null, 
+                            valueField : "value", 
+                            xtype : "multidbfindtrigger"
+                        }, 
+                        text : "物料编号", 
+                        width : 200.0, 
+                        dataIndex : "pd_prodcode", 
+                        xtype : "", 
+                        items : null
+                    }, 
+                    {
+                        text : "单位", 
+                        editor : {
+                            xtype : "textfield"
+                        },
+                        dataIndex : "pd_unit", 
+                        width : 120.0, 
+                        xtype : "", 
+                        items : null
+                    }, 
+                    {
+                        text : "数量", 
+                        dataIndex : "pd_yqty", 
+                        editor : {
+                            xtype : "numberfield"
+                        },
+                        width : 120.0, 
+                        xtype : "numbercolumn", 
+                        format:'0',
+                        items : null,
+                        summaryType: 'sum'
+                    }, 
+                    {
+                        text : "单价", 
+                        editor : {
+                            xtype : "numberfield"
+                        },
+                        format:'0,000.00',
+                        dataIndex : "pd_price", 
+                        width : 120.0, 
+                        xtype : "numbercolumn",
+                        items : null,
+                        summaryType: 'sum'
+                    }, 
+                    {
+                        text : "总额", 
+                        dataIndex : "pd_total", 
+                        width : 120.0, 
+                        xtype : "numbercolumn",
+                        summaryType: 'sum'
+                    }, 
+                    {
+                        text : "税额", 
+                        dataIndex : "pd_taxtotal", 
+                        flex : 1.0, 
+                        xtype : "numbercolumn",
+                        summaryType: 'sum'
+                    }
+                ]
+            }]
+        });
+        me.callParent(arguments);
+    }
+});

+ 11 - 0
frontend/saas-web/app/view/document/customer/FormPanelController.js

@@ -0,0 +1,11 @@
+Ext.define('saas.view.document.customer.FormPanelController', {
+    extend: 'saas.view.core.baseform.FormPanelController',
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    alias: 'controller.document-customer-formpanel',
+    init: function (form) {
+        var me = this;
+        this.control({
+        });
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/document/customer/FormPanelModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.document.customer.FormPanelModel', {
+    extend: 'saas.view.core.baseform.FormPanelModel',
+    alias: 'viewmodel.document-customer-formpanel'
+});

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

@@ -30,14 +30,14 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
         customerkind:{
             items:[{
                 xtype:'hidden',
-                name:'ck_id'
+                name:'id'
             },{
                 xtype:'textfield',
-                name:'ck_kind',
+                name:'ck_name',
                 allowBlank:false,
                 fieldLabel:'类型'
             }],
-            keyField:'ck_id',
+            keyField:'id',
             saveUrl:''
         },
         vendorkind:{

+ 5 - 12
frontend/saas-web/app/view/document/kind/Kind.js

@@ -62,20 +62,13 @@ Ext.define('saas.view.document.kind.Kind', {
         customerkind:{
             columns: [{
                 text: '客户类型',
-                dataIndex: 'ck_kind',
+                dataIndex: 'ck_name',
                 flex: 1
             }],
-            formItems:[{
-               xtype:'hidden',
-               name:'ck_id'
-            },{
-                xtype:'textfield',
-                name:'ck_kind',
-                allowBlank:false,
-                fieldLabel:'类型'
-            }],
-            keyField:'ck_id',
-            reqUrl:''
+            keyField:'id',
+            dataField:'ck_name',
+            reqUrl:'http://192.168.253.41:9480/customerkind/save',
+            delUrl:'http://192.168.253.41:9480/customerkind/delete'
         },
         vendorkind:{
             columns: [{

+ 8 - 5
frontend/saas-web/app/view/document/kind/KindModel.js

@@ -10,19 +10,22 @@ Ext.define('saas.view.document.kind.KindModel', {
     stores: {
         customerkind: {
             fields:[
-                {name: 'ck_id', type: 'int'},
-                {name: 'ck_kind',  type: 'string'}
+                {name: 'id', type: 'int'},
+                {name: 'ck_name',  type: 'string'}
             ],
             proxy: {
                 type: 'ajax',
-                url: 'resources/json/customer.json',
+                url: 'http://192.168.253.41:9480/customerkind/getAll',
+                actionMethods: {
+                    read: 'GET'
+                },
                 reader: {
-                    type: 'json'
+                    type: 'json',
+                    rootProperty: 'data'
                 }
             },
             pageSize: null,
             autoLoad: true
-
         },
         vendorkind:{
             fields:[

+ 124 - 0
frontend/saas-web/app/view/document/vendor/FormPanel.js

@@ -0,0 +1,124 @@
+Ext.define('saas.view.document.vendor.FormPanel', {
+    extend: 'saas.view.core.baseform.FormPanel',
+    xtype: 'document-vendor-formpanel',
+    controller: 'document-vendor-formpanel',
+    viewModel: 'document-vendor-formpanel',
+
+    //工具类
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+
+    //基础属性
+    layout: 'fit',
+    autoScroll: true,
+    border: 1,
+    bodyPadding: 5,
+
+    fieldDefaults: {
+        margin: '0 5 5 0',
+        labelAlign: 'right',
+        labelWidth: 90,
+        blankText: '该字段不能为空'
+    },
+
+    //字段属性
+    _title:'供应商管理',
+    _dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+    _saveUrl:'http://192.168.253.228:8800/api/document/vendor/save',
+    _deleteUrl:'http://192.168.253.228:8800/api/document/vendor/delete',
+
+    initComponent: function () {
+        var me = this;
+        Ext.apply(me, {
+            items: [{
+                name : "vendorGrid", 
+                xtype : "core-baseform-gridpanel", 
+                layout:'fit',
+                dataUrl:me._dataUrl,
+                columns : [
+                    {
+                        text : "序号", 
+                        dataIndex : "pd_detno", 
+                        width : 100, 
+                        xtype : "numbercolumn",
+                        align : 'center',
+                        format:'0',
+                        summaryType: 'count',
+                        summaryRenderer: function(value, summaryData, dataIndex) {
+                            return Ext.String.format('合计: {0}条', value);
+                        },
+                    }, 
+                    {
+                        editor : {
+                            displayField : "display", 
+                            editable : true, 
+                            format : "", 
+                            hideTrigger : false, 
+                            maxLength : 100.0, 
+                            minValue : null, 
+                            positiveNum : false, 
+                            queryMode : "local", 
+                            store : null, 
+                            valueField : "value", 
+                            xtype : "multidbfindtrigger"
+                        }, 
+                        text : "物料编号", 
+                        width : 200.0, 
+                        dataIndex : "pd_prodcode", 
+                        xtype : "", 
+                        items : null
+                    }, 
+                    {
+                        text : "单位", 
+                        editor : {
+                            xtype : "textfield"
+                        },
+                        dataIndex : "pd_unit", 
+                        width : 120.0, 
+                        xtype : "", 
+                        items : null
+                    }, 
+                    {
+                        text : "数量", 
+                        dataIndex : "pd_yqty", 
+                        editor : {
+                            xtype : "numberfield"
+                        },
+                        width : 120.0, 
+                        xtype : "numbercolumn", 
+                        format:'0',
+                        items : null,
+                        summaryType: 'sum'
+                    }, 
+                    {
+                        text : "单价", 
+                        editor : {
+                            xtype : "numberfield"
+                        },
+                        format:'0,000.00',
+                        dataIndex : "pd_price", 
+                        width : 120.0, 
+                        xtype : "numbercolumn",
+                        items : null,
+                        summaryType: 'sum'
+                    }, 
+                    {
+                        text : "总额", 
+                        dataIndex : "pd_total", 
+                        width : 120.0, 
+                        xtype : "numbercolumn",
+                        summaryType: 'sum'
+                    }, 
+                    {
+                        text : "税额", 
+                        dataIndex : "pd_taxtotal", 
+                        flex : 1.0, 
+                        xtype : "numbercolumn",
+                        summaryType: 'sum'
+                    }
+                ]
+            }]
+        });
+        me.callParent(arguments);
+    }
+});

+ 11 - 0
frontend/saas-web/app/view/document/vendor/FormPanelController.js

@@ -0,0 +1,11 @@
+Ext.define('saas.view.document.vendor.FormPanelController', {
+    extend: 'saas.view.core.baseform.FormPanelController',
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
+    FormUtil: Ext.create('saas.util.FormUtil'),
+    alias: 'controller.document-vendor-formpanel',
+    init: function (form) {
+        var me = this;
+        this.control({
+        });
+    }
+});

+ 4 - 0
frontend/saas-web/app/view/document/vendor/FormPanelModel.js

@@ -0,0 +1,4 @@
+Ext.define('saas.view.document.vendor.FormPanelModel', {
+    extend: 'saas.view.core.baseform.FormPanelModel',
+    alias: 'viewmodel.document-vendor-formpanel'
+});

+ 3 - 2
frontend/saas-web/overrides/i18n.js

@@ -1,13 +1,14 @@
 var basePath = 'http://192.168.0.181:8560/api/';
 
-function openTab(xtype, title, id) {
+function openTab(xtype, title, id, config) {
     var mainTab = Ext.getCmp('main-tab-panel');
     var panel = Ext.getCmp(id);
     if(!panel) {
         panel = Ext.create('saas.view.core.tab.Panel', {
             id: id,
             title: title,
-            viewType: xtype
+            viewType: xtype,
+            viewConfig: config
         });
 
         Ext.suspendLayouts();

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

@@ -161,11 +161,11 @@
         "text": "基础资料",
         "items": [{
             "text": "客户资料",
-            "viewType": "mainlist",
+            "viewType": "document-customer-formpanel",
             "leaf": true
         }, {
             "text": "供应商管理",
-            "viewType": "mainlist",
+            "viewType": "document-vendor-formpanel",
             "leaf": true
         }, {
             "text": "商品管理",