Browse Source

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

guq 7 years ago
parent
commit
aa73712a5f
97 changed files with 1857 additions and 611 deletions
  1. 9 0
      applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/DocBaseDTO.java
  2. 48 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Customerkind.java
  3. 48 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Productbrand.java
  4. 49 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Producttype.java
  5. 10 4
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/AddressController.java
  6. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerController.java
  7. 37 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerkindController.java
  8. 49 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductbrandController.java
  9. 37 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProducttypeController.java
  10. 2 5
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorkindController.java
  11. 18 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerkindMapper.java
  12. 19 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductbrandMapper.java
  13. 18 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProducttypeMapper.java
  14. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerkindService.java
  15. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductbrandService.java
  16. 9 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProducttypeService.java
  17. 37 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerkindServiceImpl.java
  18. 47 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductbrandServiceImpl.java
  19. 44 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProducttypeServiceImpl.java
  20. 5 9
      applications/document/document-server/src/main/resources/mapper/AddressMapper.xml
  21. 122 0
      applications/document/document-server/src/main/resources/mapper/CustomerkindMapper.xml
  22. 122 0
      applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml
  23. 125 0
      applications/document/document-server/src/main/resources/mapper/ProducttypeMapper.xml
  24. 5 8
      applications/document/document-server/src/main/resources/mapper/VendorkindMapper.xml
  25. 1 4
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  26. 3 3
      frontend/saas-web/app/util/FormUtil.js
  27. 33 39
      frontend/saas-web/app/view/core/form/FormPanel.js
  28. 3 20
      frontend/saas-web/app/view/core/form/FormPanelController.js
  29. 2 3
      frontend/saas-web/app/view/core/form/FormPanelModel.js
  30. 2 7
      frontend/saas-web/app/view/core/query/QueryFormPanel.js
  31. 6 25
      frontend/saas-web/app/view/core/query/QueryGridPanel.js
  32. 0 5
      frontend/saas-web/app/view/purchase/purchase/FormModel.js
  33. 4 2
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  34. 2 2
      frontend/saas-web/app/view/purchase/purchase/FormPanelController.js
  35. 5 0
      frontend/saas-web/app/view/purchase/purchase/FormPanelModel.js
  36. 1 0
      frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js
  37. 0 7
      frontend/saas-web/app/view/purchase/purchaseIn/FormModel.js
  38. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  39. 3 2
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js
  40. 8 0
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanelModel.js
  41. 2 2
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  42. 2 1
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js
  43. 1 1
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelModel.js
  44. 0 7
      frontend/saas-web/app/view/purchase/purchaseOut/FormModel.js
  45. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js
  46. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js
  47. 7 0
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanelModel.js
  48. 2 2
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js
  49. 2 1
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js
  50. 1 1
      frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelModel.js
  51. 0 5
      frontend/saas-web/app/view/sale/sale/FormModel.js
  52. 2 2
      frontend/saas-web/app/view/sale/sale/FormPanel.js
  53. 2 2
      frontend/saas-web/app/view/sale/sale/FormPanelController.js
  54. 5 0
      frontend/saas-web/app/view/sale/sale/FormPanelModel.js
  55. 2 2
      frontend/saas-web/app/view/sale/saleIn/FormPanel.js
  56. 2 2
      frontend/saas-web/app/view/sale/saleIn/FormPanelController.js
  57. 2 2
      frontend/saas-web/app/view/sale/saleIn/FormPanelModel.js
  58. 2 2
      frontend/saas-web/app/view/sale/saleIn/QueryPanel.js
  59. 1 1
      frontend/saas-web/app/view/sale/saleIn/QueryPanelController.js
  60. 1 1
      frontend/saas-web/app/view/sale/saleIn/QueryPanelModel.js
  61. 0 7
      frontend/saas-web/app/view/sale/saleOut/FormModel.js
  62. 2 2
      frontend/saas-web/app/view/sale/saleOut/FormPanel.js
  63. 3 2
      frontend/saas-web/app/view/sale/saleOut/FormPanelController.js
  64. 8 0
      frontend/saas-web/app/view/sale/saleOut/FormPanelModel.js
  65. 2 2
      frontend/saas-web/app/view/sale/saleOut/QueryPanel.js
  66. 2 1
      frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js
  67. 1 1
      frontend/saas-web/app/view/sale/saleOut/QueryPanelModel.js
  68. 56 87
      frontend/saas-web/app/view/stock/otherIn/FormPanel.js
  69. 3 2
      frontend/saas-web/app/view/stock/otherIn/FormPanelController.js
  70. 5 0
      frontend/saas-web/app/view/stock/otherIn/FormPanelModel.js
  71. 5 5
      frontend/saas-web/app/view/stock/otherIn/QueryPanel.js
  72. 2 2
      frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js
  73. 5 0
      frontend/saas-web/app/view/stock/otherIn/QueryPanelModel.js
  74. 234 0
      frontend/saas-web/app/view/stock/otherOut/FormPanel.js
  75. 157 0
      frontend/saas-web/app/view/stock/otherOut/FormPanelController.js
  76. 5 0
      frontend/saas-web/app/view/stock/otherOut/FormPanelModel.js
  77. 212 0
      frontend/saas-web/app/view/stock/otherOut/QueryPanel.js
  78. 115 0
      frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js
  79. 5 0
      frontend/saas-web/app/view/stock/otherOut/QueryPanelModel.js
  80. 0 5
      frontend/saas-web/app/view/storage/prodInOutOtherIn/FormModel.js
  81. 0 5
      frontend/saas-web/app/view/storage/prodInOutOtherIn/QueryPanelModel.js
  82. 16 0
      frontend/saas-web/app/view/test/test/Myv.js
  83. 5 0
      frontend/saas-web/app/view/test/test/MyvController.js
  84. 8 0
      frontend/saas-web/app/view/test/test/MyvModel.js
  85. 0 3
      frontend/saas-web/packages/local/theme-default/resources/Readme.md
  86. 0 7
      frontend/saas-web/resources/json/customer.json
  87. 0 17
      frontend/saas-web/resources/json/detailGridColumns1.json
  88. 0 85
      frontend/saas-web/resources/json/formItems.json
  89. 0 36
      frontend/saas-web/resources/json/gridColumns1.json
  90. 0 22
      frontend/saas-web/resources/json/gridColumns2.json
  91. 0 17
      frontend/saas-web/resources/json/gridData1.json
  92. 0 25
      frontend/saas-web/resources/json/gridData2.json
  93. 4 4
      frontend/saas-web/resources/json/navigation.json
  94. 0 44
      frontend/saas-web/resources/json/purchase/formItems.json
  95. 0 21
      frontend/saas-web/resources/json/purchase/vendorColumnsDbfind.json
  96. 0 17
      frontend/saas-web/resources/json/purchase/vendorDataDbfind.json
  97. 0 7
      frontend/saas-web/resources/json/vendor.json

+ 9 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/DocBaseDTO.java

@@ -45,4 +45,13 @@ public class DocBaseDTO implements Serializable{
                 ", name='" + name + '\'' +
                 '}';
     }
+
+    public DocBaseDTO(Long id, String code, String name) {
+        this.id = id;
+        this.code = code;
+        this.name = name;
+    }
+
+    public DocBaseDTO() {
+    }
 }

+ 48 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Customerkind.java

@@ -0,0 +1,48 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Customerkind extends CommonBaseEntity implements Serializable {
+    private String ck_name;
+
+    private Integer ck_recordid;
+
+    private String ck_recorder;
+
+    private Date ck_date;
+
+    public String getCk_name() {
+        return ck_name;
+    }
+
+    public void setCk_name(String ck_name) {
+        this.ck_name = ck_name == null ? null : ck_name.trim();
+    }
+
+    public Integer getCk_recordid() {
+        return ck_recordid;
+    }
+
+    public void setCk_recordid(Integer ck_recordid) {
+        this.ck_recordid = ck_recordid;
+    }
+
+    public String getCk_recorder() {
+        return ck_recorder;
+    }
+
+    public void setCk_recorder(String ck_recorder) {
+        this.ck_recorder = ck_recorder == null ? null : ck_recorder.trim();
+    }
+
+    public Date getCk_date() {
+        return ck_date;
+    }
+
+    public void setCk_date(Date ck_date) {
+        this.ck_date = ck_date;
+    }
+}

+ 48 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Productbrand.java

@@ -0,0 +1,48 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Productbrand extends CommonBaseEntity implements Serializable {
+    private String pb_name;
+
+    private Integer pb_recordid;
+
+    private String pb_recorder;
+
+    private Date pb_date;
+
+    public String getPb_name() {
+        return pb_name;
+    }
+
+    public void setPb_name(String pb_name) {
+        this.pb_name = pb_name == null ? null : pb_name.trim();
+    }
+
+    public Integer getPb_recordid() {
+        return pb_recordid;
+    }
+
+    public void setPb_recordid(Integer pb_recordid) {
+        this.pb_recordid = pb_recordid;
+    }
+
+    public String getPb_recorder() {
+        return pb_recorder;
+    }
+
+    public void setPb_recorder(String pb_recorder) {
+        this.pb_recorder = pb_recorder == null ? null : pb_recorder.trim();
+    }
+
+    public Date getPb_date() {
+        return pb_date;
+    }
+
+    public void setPb_date(Date pb_date) {
+        this.pb_date = pb_date;
+    }
+}

+ 49 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Producttype.java

@@ -0,0 +1,49 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Producttype extends CommonBaseEntity implements Serializable {
+
+    private String pt_name;
+
+    private Integer pt_recordid;
+
+    private String pt_recorder;
+
+    private Date pt_date;
+
+    public String getPt_name() {
+        return pt_name;
+    }
+
+    public void setPt_name(String pt_name) {
+        this.pt_name = pt_name == null ? null : pt_name.trim();
+    }
+
+    public Integer getPt_recordid() {
+        return pt_recordid;
+    }
+
+    public void setPt_recordid(Integer pt_recordid) {
+        this.pt_recordid = pt_recordid;
+    }
+
+    public String getPt_recorder() {
+        return pt_recorder;
+    }
+
+    public void setPt_recorder(String pt_recorder) {
+        this.pt_recorder = pt_recorder == null ? null : pt_recorder.trim();
+    }
+
+    public Date getPt_date() {
+        return pt_date;
+    }
+
+    public void setPt_date(Date pt_date) {
+        this.pt_date = pt_date;
+    }
+}

+ 10 - 4
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/AddressController.java

@@ -6,9 +6,9 @@ import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.document.entities.Address;
 import com.usoftchina.saas.document.service.AddressService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 @RestController
 @RequestMapping("/address")
@@ -24,7 +24,7 @@ public class AddressController {
     }
 
     @PostMapping("/delete/{id}")
-    public Result deleteById(Long id){
+    public Result deleteById(@PathVariable("id") Long id){
         addressService.removeByPrimaryKey(id);
         return Result.success();
     }
@@ -35,4 +35,10 @@ public class AddressController {
         return Result.success();
     }
 
+    @GetMapping("/getAll")
+    public Result<List<Address>> getAll(){
+        List<Address> addresseList = addressService.findAll();
+        return Result.success(addresseList);
+    }
+
 }

+ 9 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerController.java

@@ -0,0 +1,9 @@
+package com.usoftchina.saas.document.controller;
+
+/**
+ * Created by zdw
+ * 2018-10-23 11:39.
+ */
+
+public class CustomerController {
+}

+ 37 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/CustomerkindController.java

@@ -0,0 +1,37 @@
+package com.usoftchina.saas.document.controller;
+
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.document.entities.Customerkind;
+import com.usoftchina.saas.document.service.CustomerkindService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/customerkind")
+public class CustomerkindController {
+
+    @Autowired
+    private CustomerkindService customerkindService;
+
+    @PostMapping("/save")
+    public Result save(Customerkind customerkind){
+        customerkindService.save(customerkind);
+        return Result.success();
+    }
+
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id){
+        customerkindService.removeByPrimaryKey(id);
+        return Result.success();
+    }
+
+    @GetMapping("/getAll")
+    public Result getAll(){
+        List<Customerkind> customerkindList = customerkindService.findAll();
+        return Result.success(customerkindList);
+    }
+
+}

+ 49 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductbrandController.java

@@ -0,0 +1,49 @@
+package com.usoftchina.saas.document.controller;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.document.entities.Productbrand;
+import com.usoftchina.saas.document.service.ProductbrandService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/productbrand")
+public class ProductbrandController {
+
+    @Autowired
+    private ProductbrandService productbrandService;
+
+    /**
+     * 保存
+     * @param productbrand
+     * @return
+     */
+    @PostMapping("/save")
+    public Result save(Productbrand productbrand){
+        productbrandService.save(productbrand);
+        return Result.success();
+    }
+
+    /**
+     * 删除
+     * @param id
+     * @return
+     */
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id){
+        productbrandService.removeByPrimaryKey(id);
+        return  Result.success();
+    }
+
+    /**
+     * 查询所有
+     * @return
+     */
+    @GetMapping("/getAll")
+    public Result getAll(){
+        List<Productbrand> productbrandList = productbrandService.findAll();
+        return Result.success(productbrandList);
+    }
+}

+ 37 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProducttypeController.java

@@ -0,0 +1,37 @@
+package com.usoftchina.saas.document.controller;
+
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.document.entities.Producttype;
+import com.usoftchina.saas.document.service.ProducttypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/producttype")
+public class ProducttypeController {
+
+    @Autowired
+    private ProducttypeService producttypeService;
+
+    @GetMapping("/getAll")
+    public Result<List<Producttype>> getAll(){
+        List<Producttype> producttypeList = producttypeService.findAll();
+        return Result.success(producttypeList);
+    }
+
+    @PostMapping("/save")
+    public Result save(Producttype producttype){
+        producttypeService.save(producttype);
+        return Result.success();
+    }
+
+    @PostMapping("/delete/{id}")
+    public Result delete(@PathVariable("id") Long id){
+        producttypeService.removeByPrimaryKey(id);
+        return Result.success();
+    }
+
+
+}

+ 2 - 5
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/VendorkindController.java

@@ -4,10 +4,7 @@ import com.usoftchina.saas.base.Result;
 import com.usoftchina.saas.document.entities.Vendorkind;
 import com.usoftchina.saas.document.service.VendorkindService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
@@ -25,7 +22,7 @@ public class VendorkindController {
     }
 
     @PostMapping("/delete/{id}")
-    public Result delete(long id){
+    public Result delete(@PathVariable("id") long id){
         vendorkindService.removeByPrimaryKey(id);
         return Result.success();
     }

+ 18 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerkindMapper.java

@@ -0,0 +1,18 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Customerkind;
+
+public interface CustomerkindMapper extends CommonBaseMapper<Customerkind> {
+    int deleteByPrimaryKey(Long ck_id);
+
+    int insert(Customerkind record);
+
+    int insertSelective(Customerkind record);
+
+    Customerkind selectByPrimaryKey(Long ck_id);
+
+    int updateByPrimaryKeySelective(Customerkind record);
+
+    int updateByPrimaryKey(Customerkind record);
+}

+ 19 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductbrandMapper.java

@@ -0,0 +1,19 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Productbrand;
+
+public interface ProductbrandMapper extends CommonBaseMapper<Productbrand> {
+
+    int deleteByPrimaryKey(Long pb_id);
+
+    int insert(Productbrand record);
+
+    int insertSelective(Productbrand record);
+
+    Productbrand selectByPrimaryKey(Long pb_id);
+
+    int updateByPrimaryKeySelective(Productbrand record);
+
+    int updateByPrimaryKey(Productbrand record);
+}

+ 18 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProducttypeMapper.java

@@ -0,0 +1,18 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Producttype;
+
+public interface ProducttypeMapper extends CommonBaseMapper<Producttype> {
+    int deleteByPrimaryKey(Long id);
+
+    int insert(Producttype record);
+
+    int insertSelective(Producttype record);
+
+    Producttype selectByPrimaryKey(Long id);
+
+    int updateByPrimaryKeySelective(Producttype record);
+
+    int updateByPrimaryKey(Producttype record);
+}

+ 9 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/CustomerkindService.java

@@ -0,0 +1,9 @@
+package com.usoftchina.saas.document.service;
+
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.document.entities.Customerkind;
+import com.usoftchina.saas.document.mapper.CustomerkindMapper;
+
+public interface CustomerkindService extends CommonBaseService<CustomerkindMapper, Customerkind> {
+
+}

+ 9 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProductbrandService.java

@@ -0,0 +1,9 @@
+package com.usoftchina.saas.document.service;
+
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.document.entities.Productbrand;
+import com.usoftchina.saas.document.mapper.ProductbrandMapper;
+
+public interface ProductbrandService extends CommonBaseService<ProductbrandMapper, Productbrand> {
+
+}

+ 9 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/ProducttypeService.java

@@ -0,0 +1,9 @@
+package com.usoftchina.saas.document.service;
+
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.document.entities.Producttype;
+import com.usoftchina.saas.document.mapper.ProducttypeMapper;
+
+public interface ProducttypeService extends CommonBaseService<ProducttypeMapper, Producttype> {
+
+}

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

@@ -0,0 +1,37 @@
+package com.usoftchina.saas.document.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.document.entities.Customerkind;
+import com.usoftchina.saas.document.mapper.CustomerkindMapper;
+import com.usoftchina.saas.document.service.CustomerkindService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class CustomerkindServiceImpl extends CommonBaseServiceImpl<CustomerkindMapper, Customerkind> implements CustomerkindService {
+
+    @Autowired
+    private CustomerkindMapper customerkindMapper;
+
+    /**
+     * 保存
+     * @param customerkind
+     * @return
+     */
+    @Override
+    public boolean save(Customerkind customerkind){
+        if(customerkind.getId() == 0){
+            customerkindMapper.insertSelective(customerkind);
+        }else{
+            customerkindMapper.updateByPrimaryKeySelective(customerkind);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean removeByPrimaryKey(Long id){
+        customerkindMapper.deleteByPrimaryKey(id);
+        return true;
+    }
+
+}

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

@@ -0,0 +1,47 @@
+package com.usoftchina.saas.document.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.commons.api.MessageLogService;
+import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.context.BaseContextHolder;
+import com.usoftchina.saas.document.entities.Productbrand;
+import com.usoftchina.saas.document.mapper.ProductbrandMapper;
+import com.usoftchina.saas.document.service.ProductbrandService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class ProductbrandServiceImpl extends CommonBaseServiceImpl<ProductbrandMapper, Productbrand> implements ProductbrandService {
+
+    @Autowired
+    private ProductbrandMapper productbrandMapper;
+    @Autowired
+    private MessageLogService messageLogService;
+
+    private final String LOG_NAME = "物料品牌";
+
+    @Override
+    public boolean save(Productbrand productbrand){
+        productbrand.setCompanyId(BaseContextHolder.getCompanyId());
+        if(productbrand.getId() == 0){
+            productbrandMapper.insertSelective(productbrand);
+            //记录日志
+            DocBaseDTO docBaseDTO = new DocBaseDTO(productbrand.getId(), null, LOG_NAME);
+            messageLogService.save(docBaseDTO);
+        }else{
+            productbrandMapper.updateByPrimaryKeySelective(productbrand);
+            //记录日志
+            DocBaseDTO docBaseDTO = new DocBaseDTO(productbrand.getId(), null, LOG_NAME);
+            messageLogService.update(docBaseDTO);
+        }
+        return true;
+    }
+
+    @Override
+    public boolean removeByPrimaryKey(Long id){
+        productbrandMapper.deleteByPrimaryKey(id);
+        //记录日志
+        DocBaseDTO docBaseDTO = new DocBaseDTO(id, null, LOG_NAME);
+        messageLogService.delete(docBaseDTO);
+        return true;
+    }
+
+}

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

@@ -0,0 +1,44 @@
+package com.usoftchina.saas.document.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.document.entities.Producttype;
+import com.usoftchina.saas.document.mapper.ProducttypeMapper;
+import com.usoftchina.saas.document.service.ProducttypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class ProducttypeServiceImpl extends CommonBaseServiceImpl<ProducttypeMapper, Producttype> implements ProducttypeService {
+
+    @Autowired
+    private ProducttypeMapper producttypeMapper;
+
+    /**
+     * 保存
+     * @param producttype
+     * @return
+     */
+    @Override
+    public boolean save(Producttype producttype){
+        if(producttype.getId() == 0){
+            producttypeMapper.insertSelective(producttype);
+        }else{
+            producttypeMapper.updateByPrimaryKeySelective(producttype);
+        }
+        return true;
+    }
+
+    /**
+     * 删除
+     * @param id
+     * @return
+     */
+    @Override
+    public boolean removeByPrimaryKey(Long id){
+        producttypeMapper.deleteByPrimaryKey(id);
+        return true;
+    }
+
+}

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

@@ -25,11 +25,11 @@
   </sql>
 
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Address">
-    insert into address (ad_id, ad_recorddate, companyId, 
+    insert into address (ad_recorddate, companyId,
       updaterId, updateTime, ad_text1, 
       ad_text2, ad_text3, ad_text4, 
       ad_text5, ad_address)
-    values (#{ad_id,jdbcType=INTEGER}, #{ad_recorddate,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER}, 
+    values (#{ad_recorddate,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER},
       #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{ad_text1,jdbcType=VARCHAR}, 
       #{ad_text2,jdbcType=VARCHAR}, #{ad_text3,jdbcType=VARCHAR}, #{ad_text4,jdbcType=VARCHAR}, 
       #{ad_text5,jdbcType=VARCHAR}, #{ad_address,jdbcType=LONGVARCHAR})
@@ -37,9 +37,6 @@
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Address">
     insert into address
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="ad_id != null">
-        ad_id,
-      </if>
       <if test="ad_recorddate != null">
         ad_recorddate,
       </if>
@@ -72,9 +69,6 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="ad_id != null">
-        #{ad_id,jdbcType=INTEGER},
-      </if>
       <if test="ad_recorddate != null">
         #{ad_recorddate,jdbcType=TIMESTAMP},
       </if>
@@ -178,5 +172,7 @@
     delete from address
     where ad_id in (#{ids,jdbcType=VARCHAR})
   </delete>
-
+  <select id="selectAll" resultMap="ResultMapWithBLOBs">
+    SELECT * FROM ADDRESS
+  </select>
 </mapper>

+ 122 - 0
applications/document/document-server/src/main/resources/mapper/CustomerkindMapper.xml

@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.saas.document.mapper.CustomerkindMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Customerkind" >
+    <id column="ck_id" property="id" jdbcType="INTEGER" />
+    <result column="ck_name" property="ck_name" jdbcType="VARCHAR" />
+    <result column="ck_recordid" property="ck_recordid" jdbcType="INTEGER" />
+    <result column="ck_recorder" property="ck_recorder" jdbcType="VARCHAR" />
+    <result column="ck_date" property="ck_date" jdbcType="TIMESTAMP" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from customerkind
+    where ck_id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from customerkind
+    where ck_id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Customerkind" >
+    insert into customerkind (ck_name, ck_recordid,
+      ck_recorder, ck_date, companyId, 
+      updaterId, updateTime)
+    values (#{ck_name,jdbcType=VARCHAR}, #{ck_recordid,jdbcType=INTEGER},
+      #{ck_recorder,jdbcType=VARCHAR}, #{ck_date,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER}, 
+      #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Customerkind" >
+    insert into customerkind
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="ck_name != null" >
+        ck_name,
+      </if>
+      <if test="ck_recordid != null" >
+        ck_recordid,
+      </if>
+      <if test="ck_recorder != null" >
+        ck_recorder,
+      </if>
+      <if test="ck_date != null" >
+        ck_date,
+      </if>
+      <if test="companyId != null" >
+        companyId,
+      </if>
+      <if test="updaterId != null" >
+        updaterId,
+      </if>
+      <if test="updateTime != null" >
+        updateTime,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="ck_name != null" >
+        #{ck_name,jdbcType=VARCHAR},
+      </if>
+      <if test="ck_recordid != null" >
+        #{ck_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="ck_recorder != null" >
+        #{ck_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="ck_date != null" >
+        #{ck_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Customerkind" >
+    update customerkind
+    <set >
+      <if test="ck_name != null" >
+        ck_name = #{ck_name,jdbcType=VARCHAR},
+      </if>
+      <if test="ck_recordid != null" >
+        ck_recordid = #{ck_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="ck_recorder != null" >
+        ck_recorder = #{ck_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="ck_date != null" >
+        ck_date = #{ck_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where ck_id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customerkind" >
+    update customerkind
+    set ck_name = #{ck_name,jdbcType=VARCHAR},
+      ck_recordid = #{ck_recordid,jdbcType=INTEGER},
+      ck_recorder = #{ck_recorder,jdbcType=VARCHAR},
+      ck_date = #{ck_date,jdbcType=TIMESTAMP},
+      companyId = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP}
+    where ck_id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="selectAll" resultMap="BaseResultMap">
+    SELECT * FROM CUSTOMERKIND
+  </select>
+</mapper>

+ 122 - 0
applications/document/document-server/src/main/resources/mapper/ProductbrandMapper.xml

@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.saas.document.mapper.ProductbrandMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Productbrand" >
+    <id column="pb_id" property="id" jdbcType="INTEGER" />
+    <result column="pb_name" property="pb_name" jdbcType="VARCHAR" />
+    <result column="pb_recordid" property="pb_recordid" jdbcType="INTEGER" />
+    <result column="pb_recorder" property="pb_recorder" jdbcType="VARCHAR" />
+    <result column="pb_date" property="pb_date" jdbcType="TIMESTAMP" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+  </resultMap>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+    select 
+    <include refid="Base_Column_List" />
+    from productbrand
+    where pb_id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+    delete from productbrand
+    where pb_id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
+    insert into productbrand (pb_name, pb_recordid,
+      pb_recorder, pb_date, companyId, 
+      updaterId, updateTime)
+    values (#{pb_name,jdbcType=VARCHAR}, #{pb_recordid,jdbcType=INTEGER},
+      #{pb_recorder,jdbcType=VARCHAR}, #{pb_date,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER}, 
+      #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
+    insert into productbrand
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="pb_name != null" >
+        pb_name,
+      </if>
+      <if test="pb_recordid != null" >
+        pb_recordid,
+      </if>
+      <if test="pb_recorder != null" >
+        pb_recorder,
+      </if>
+      <if test="pb_date != null" >
+        pb_date,
+      </if>
+      <if test="companyId != null" >
+        companyId,
+      </if>
+      <if test="updaterId != null" >
+        updaterId,
+      </if>
+      <if test="updateTime != null" >
+        updateTime,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="pb_name != null" >
+        #{pb_name,jdbcType=VARCHAR},
+      </if>
+      <if test="pb_recordid != null" >
+        #{pb_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="pb_recorder != null" >
+        #{pb_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="pb_date != null" >
+        #{pb_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null" >
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
+    update productbrand
+    <set >
+      <if test="pb_name != null" >
+        pb_name = #{pb_name,jdbcType=VARCHAR},
+      </if>
+      <if test="pb_recordid != null" >
+        pb_recordid = #{pb_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="pb_recorder != null" >
+        pb_recorder = #{pb_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="pb_date != null" >
+        pb_date = #{pb_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null" >
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null" >
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null" >
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where pb_id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Productbrand" >
+    update productbrand
+    set pb_name = #{pb_name,jdbcType=VARCHAR},
+      pb_recordid = #{pb_recordid,jdbcType=INTEGER},
+      pb_recorder = #{pb_recorder,jdbcType=VARCHAR},
+      pb_date = #{pb_date,jdbcType=TIMESTAMP},
+      companyId = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP}
+    where pb_id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="selectAll" resultMap="BaseResultMap">
+    SELECT * FROM PRODUCTBRAND
+  </select>
+</mapper>

+ 125 - 0
applications/document/document-server/src/main/resources/mapper/ProducttypeMapper.xml

@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.usoftchina.saas.document.mapper.ProducttypeMapper">
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Producttype">
+    <id column="pt_id" jdbcType="INTEGER" property="id" />
+    <result column="pt_name" jdbcType="VARCHAR" property="pt_name" />
+    <result column="pt_recordid" jdbcType="INTEGER" property="pt_recordid" />
+    <result column="pt_recorder" jdbcType="VARCHAR" property="pt_recorder" />
+    <result column="pt_date" jdbcType="TIMESTAMP" property="pt_date" />
+    <result column="companyId" jdbcType="INTEGER" property="companyId" />
+    <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
+    <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    pt_id, pt_name, pt_recordid, pt_recorder, pt_date, companyId, updaterId, updateTime
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from producttype
+    where pt_id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from producttype
+    where pt_id = #{id}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Producttype">
+    insert into producttype (pt_name, pt_recordid,
+      pt_recorder, pt_date, companyId, 
+      updaterId, updateTime)
+    values (#{pt_name,jdbcType=VARCHAR}, #{pt_recordid,jdbcType=INTEGER},
+      #{pt_recorder,jdbcType=VARCHAR}, #{pt_date,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER}, 
+      #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Producttype">
+    insert into producttype
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="pt_name != null">
+        pt_name,
+      </if>
+      <if test="pt_recordid != null">
+        pt_recordid,
+      </if>
+      <if test="pt_recorder != null">
+        pt_recorder,
+      </if>
+      <if test="pt_date != null">
+        pt_date,
+      </if>
+      <if test="companyId != null">
+        companyId,
+      </if>
+      <if test="updaterId != null">
+        updaterId,
+      </if>
+      <if test="updateTime != null">
+        updateTime,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="pt_name != null">
+        #{pt_name,jdbcType=VARCHAR},
+      </if>
+      <if test="pt_recordid != null">
+        #{pt_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="pt_recorder != null">
+        #{pt_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="pt_date != null">
+        #{pt_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Producttype">
+    update producttype
+    <set>
+      <if test="pt_name != null">
+        pt_name = #{pt_name,jdbcType=VARCHAR},
+      </if>
+      <if test="pt_recordid != null">
+        pt_recordid = #{pt_recordid,jdbcType=INTEGER},
+      </if>
+      <if test="pt_recorder != null">
+        pt_recorder = #{pt_recorder,jdbcType=VARCHAR},
+      </if>
+      <if test="pt_date != null">
+        pt_date = #{pt_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null">
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where pt_id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Producttype">
+    update producttype
+    set pt_name = #{pt_name,jdbcType=VARCHAR},
+      pt_recordid = #{pt_recordid,jdbcType=INTEGER},
+      pt_recorder = #{pt_recorder,jdbcType=VARCHAR},
+      pt_date = #{pt_date,jdbcType=TIMESTAMP},
+      companyId = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP}
+    where pt_id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="selectAll" resultMap="com.usoftchina.saas.document.entities.Producttype">
+    SELECT * FROM PRODUCTTYPE
+  </select>
+</mapper>

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

@@ -25,19 +25,16 @@
     where vk_id = #{id,jdbcType=INTEGER}
   </delete>
   <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Vendorkind">
-    insert into vendorkind (vk_id, vk_name, vk_recordid,
+    insert into vendorkind (vk_name, vk_recordid,
     vk_recorder, vk_date, companyId,
     updaterId, updateTime)
-    values (#{id,jdbcType=INTEGER}, #{vk_name,jdbcType=VARCHAR}, #{vk_recordid,jdbcType=INTEGER},
+    values (#{vk_name,jdbcType=VARCHAR}, #{vk_recordid,jdbcType=INTEGER},
     #{vk_recorder,jdbcType=VARCHAR}, #{vk_date,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER},
     #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Vendorkind">
     insert into vendorkind
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        vk_id,
-      </if>
       <if test="vk_name != null">
         vk_name,
       </if>
@@ -61,9 +58,6 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
       <if test="vk_name != null">
         #{vk_name,jdbcType=VARCHAR},
       </if>
@@ -125,4 +119,7 @@
     updateTime = #{updateTime,jdbcType=TIMESTAMP}
     where vk_id = #{id,jdbcType=INTEGER}
   </update>
+  <select id="selectAll" resultMap="BaseResultMap">
+    SELECT * FROM VENDORKIND
+  </select>
 </mapper>

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

@@ -472,10 +472,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             return null;
         }
         String code = purchaseMapper.selectCodeById(id);
-        DocBaseDTO baseDTO = new DocBaseDTO();
-        baseDTO.setId(id);
-        baseDTO.setCode(code);
-        baseDTO.setName("Purchase");
+        DocBaseDTO baseDTO = new DocBaseDTO(id, code, "Purchase");
         return baseDTO;
     }
 }

+ 3 - 3
frontend/saas-web/app/util/FormUtil.js

@@ -66,11 +66,11 @@ Ext.define('saas.util.FormUtil', {
                             }).map(function(c) {
                                 return c.dataIndex
                             });
-                            formModel.set('_detailBindFields', cnames);
+                            formModel.set('detailBindFields', cnames);
                             item.bind = {
-                                store: '{_detailStore}'
+                                store: '{detailStore}'
                             };     
-                            formModel.set('_detailStore', Ext.create('Ext.data.Store', {
+                            formModel.set('detailStore', Ext.create('Ext.data.Store', {
                                 model:item.storeModel,
                                 data: []
                             }));

+ 33 - 39
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -1,6 +1,6 @@
 Ext.define('saas.view.core.form.FormPanel', {
     extend: 'Ext.form.Panel',
-    xtype: 'core-formpanel',
+    xtype: 'core-form-formpanel',
     controller: 'core-form-formpanel',
     viewModel: 'core-form-formpanel',
 
@@ -116,37 +116,19 @@ Ext.define('saas.view.core.form.FormPanel', {
 
     /**
      * 获取form数据
-     * @param all: true:取全部数据,false:排除忽视字段
      */
-    getFormData: function(all) {
+    getFormData: function() {
         var me = this,
         viewModel = me.getViewModel(),
         allData = viewModel.getData(),
-        bindFields = allData._bindFields,
-        formData = {
-            main: {},
-            detail: []
+        formData = allData['form'],
+        detailStore = allData['detailStore'],
+        data = {
+            main: formData,
+            detail: detailStore.getData().items
         };
 
-        for(k in allData) {
-            var d = allData[k];
-            // 主表数据
-            if(all) {
-                formData.main[k] = d;
-            }else {
-                if(bindFields.indexOf(k) != -1) {
-                    formData.main[k] = d;
-                }
-            }
-
-            // 从表数据
-            if(k == '_detailStore') {
-                storeData = d.getData().items;
-                formData.detail = storeData;
-            }
-        }
-        
-        return formData;
+        return data;
     },
 
     setFormData: function(formData) {
@@ -154,7 +136,7 @@ Ext.define('saas.view.core.form.FormPanel', {
         main = formData.main,
         detail = formData.detail,
         viewModel = me.getViewModel(),
-        detailStore = viewModel.get('_detailStore');
+        detailStore = viewModel.get('detailStore');
 
         viewModel.setData(main);
         detailStore.loadData(detail);
@@ -165,25 +147,37 @@ Ext.define('saas.view.core.form.FormPanel', {
      */
     setBindFields: function(items) {
         var me = this,
-        viewModel = me.getViewModel(),
-        bindFields = [];
+        viewModel = me.getViewModel();
 
         Ext.Array.each(items, function(item) {
-            var ignore = item.ignore,
-            bind = item.bind;
+            var bind = item.bind,
+            name = item.name,
+            ignore = item.ignore,
+            defaultValue = item.defaultValue;
 
-            if(!ignore && bind) {
-                if(!Ext.isString(bind)) {
-                    // 这里默认所有的fields都绑定的value,如果是其他属性则需要在加载成组件之后去获取他的defaultBind
-                    bind = bind.value;
-                }
+            // 设置model绑定
+            if(!ignore) {
                 if(bind) {
-                    bind = bind.replace(/[{|}]/g, '');
-                    bindFields.push(bind);
+                    if(!Ext.isString(bind)) {
+                        bind = name;
+                        Ext.apply(bind, {
+                            value: '{form.' + bind + '}'
+                        });
+                    }else {
+                        bind = bind.replace(/[{|}]/g, '');
+                        item.bind = '{form.' + bind + '}';
+                    }
+                }else {
+                    bind = name;
+                    item.bind = '{form.' + bind + '}';
+                }
+                // 设置默认值
+                if(defaultValue) {
+                    viewModel.set('form.' + bind, defaultValue);
                 }
             }
+
         });
-        viewModel.set('_bindFields', bindFields);
     },
 
     initFormData: function(formData) {

+ 3 - 20
frontend/saas-web/app/view/core/form/FormPanelController.js

@@ -17,22 +17,8 @@ Ext.define('saas.view.core.form.FormPanelController', {
 
     add: function(){
         var form = this.getView();
-        var mainTab = Ext.getCmp('main-tab-panel');
-        var title = '新增' + form._title;
         var id = form.xtype + '_add';
-        existingItem = mainTab.down('[id=' + id + ']');
-        lastView = mainTab.getActiveTab();
-        if (!existingItem) {
-            var form = {
-                initId:0,
-                id,
-                title,
-                xtype:form.xtype
-            };
-            mainTab.setActiveTab(mainTab.add(form));
-        }else{
-            mainTab.setActiveTab(existingItem);
-        }
+        openTab(form.xtype,'新增' + form._title,id);
     },
     
     delete: function(){
@@ -62,10 +48,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
 
     onSave: function() {
         var me = this,
-        form = this.getView(),
-        viewModel = me.getViewModel(),
-        modelData = viewModel.getData(),
-        detailBindFields = modelData._detailBindFields;
+        form = this.getView();
 
         if(form.getForm().wasDirty==false){
             Ext.Msg.alert('提示','未修改数据,请修改后保存');
@@ -86,7 +69,7 @@ Ext.define('saas.view.core.form.FormPanelController', {
         form = this.getView(),
         viewModel = me.getViewModel(),
         modelData = viewModel.getData(),
-        detailBindFields = modelData._detailBindFields;
+        detailBindFields = modelData.detailBindFields;
 
         var gridData = formData.detail?formData.detail:[];
         var dirtyGridData = [];

+ 2 - 3
frontend/saas-web/app/view/core/form/FormPanelModel.js

@@ -4,9 +4,8 @@ Ext.define('saas.view.core.form.FormPanelModel', {
 
     data: {
         id:0,
-        _bindFields: [], // 主表绑定字段,绑定到formfield并且未设置ignore为true
-        _detailBindeFields: [], // 从表绑定列
-        _detailStore: null, // 从表store
+        detailBindeFields: [], // 从表绑定列
+        detailStore: null, // 从表store
     },
 
     formulas:{

+ 2 - 7
frontend/saas-web/app/view/core/query/QueryFormPanel.js

@@ -7,17 +7,12 @@ Ext.define('saas.view.core.query.QueryFormPanel', {
     bodyPadding: 5,
     labelSeparator : ':',
     defaults:{
-		xtype:'textfield',
-		columnWidth:0.33,
-		margin:'5 5 5 5'
-	},
-    fieldDefaults: {
-        margin: '0 5 5 0',
+		margin: '0 5 5 0',
         labelAlign: 'right',
         labelWidth: 90,
         columnWidth: 0.25,
         blankText: '该字段不能为空'
-    },
+	},
 
     dockedItems: [{
         xtype: 'toolbar',

+ 6 - 25
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -182,20 +182,10 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
     listeners: {
         itemdblClick: function (tableView, record, item, index, e, eOpts) {
             var grid = tableView.up('grid'),
-                mainTab = Ext.getCmp('main-tab-panel'),
-                idValue = record.get(grid.idField),
-                codeValue = record.get(grid.codeField),
-                id = grid.xtype + idValue;
-                existingItem = mainTab.down('[id=' + id + ']');
-            if (!existingItem) {
-                var form = {
-                    xtype:grid.addXtype,
-                    id,
-                    title:grid.addTitle+"("+codeValue+")",
-                    initId:idValue
-                };
-                mainTab.setActiveTab(mainTab.add(form));
-            }
+            idValue = record.get(grid.idField),
+            codeValue = record.get(grid.codeField),
+            id = grid.xtype + idValue;
+            openTab(grid.addXtype,grid.addTitle+"("+codeValue+")",id);
         }
     },
     getFields: function() {
@@ -208,17 +198,8 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
     },
     onAddMore: function (me) {
         var grid = me.up('grid'),
-            mainTab = Ext.getCmp('main-tab-panel'),
-            id = grid.xtype + '_add';
-            existingItem = mainTab.down('[id=' + id + ']');
-        if (!existingItem) {
-            var form = {
-                xtype:grid.addXtype,
-                id,
-                title:'新增'+grid.addTitle
-            };
-            mainTab.setActiveTab(mainTab.add(form));
-        }
+        id = grid.xtype + '_add';
+        openTab(grid.addXtype,'新增'+grid.addTitle,id)
     },
     onAudit: function(me){
         console.log('审核');

+ 0 - 5
frontend/saas-web/app/view/purchase/purchase/FormModel.js

@@ -1,5 +0,0 @@
-Ext.define('saas.view.purchase.purchase.FormModel', {
-    extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.purchase-purchase-formmodel',
-
-});

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

@@ -2,8 +2,10 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
     xtype: 'purchase-purchase-formpanel',
 
-    controller: 'purchase-purchase-formcontroller',
-    viewModel: 'purchase-purchase-formmodel',
+    controller: 'purchase-purchase-formpanel',
+    viewModel: 'purchase-purchase-formpanel',
+
+    viewName: 'purchase-purchase-formpanel',
     
     caller:'Purchase',
     

+ 2 - 2
frontend/saas-web/app/view/purchase/purchase/FormController.js → frontend/saas-web/app/view/purchase/purchase/FormPanelController.js

@@ -1,6 +1,6 @@
-Ext.define('saas.view.purchase.purchase.FormController', {
+Ext.define('saas.view.purchase.purchase.FormPanelController', {
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.purchase-purchase-formcontroller',
+    alias: 'controller.purchase-purchase-formpanel',
     init: function (form) {
         var me = this;
         this.control({

+ 5 - 0
frontend/saas-web/app/view/purchase/purchase/FormPanelModel.js

@@ -0,0 +1,5 @@
+Ext.define('saas.view.purchase.purchase.FormPanelModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.purchase-purchase-formpanel',
+
+});

+ 1 - 0
frontend/saas-web/app/view/purchase/purchase/QueryPanelController.js

@@ -1,6 +1,7 @@
 Ext.define('saas.view.purchase.purchase.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
     alias: 'controller.purchase-purchase-querypanel',
+    
     init: function (form) {
         var me = this;
         this.control({

+ 0 - 7
frontend/saas-web/app/view/purchase/purchaseIn/FormModel.js

@@ -1,7 +0,0 @@
-Ext.define('saas.view.purchase.purchaseIn.FormModel', {
-    extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.purchase-purchasein-formmodel',
-    data: {
-        pi_class: '采购验收单'
-     }
-});

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

@@ -2,8 +2,8 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
     xtype: 'purchase-purchasein-formpanel',
 
-    controller: 'purchase-purchasein-formcontroller',
-    viewModel: 'purchase-purchasein-formmodel',
+    controller: 'purchase-purchasein-formpanel',
+    viewModel: 'purchase-purchasein-formpanel',
     caller:'PurchaseIn',
     
      //字段属性

+ 3 - 2
frontend/saas-web/app/view/purchase/purchaseIn/FormController.js → frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js

@@ -1,6 +1,7 @@
-Ext.define('saas.view.purchase.purchaseIn.FormController', {
+Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.purchase-purchasein-formcontroller',
+    alias: 'controller.purchase-purchasein-formpanel',
+    
     init: function (form) {
         var me = this;
         this.control({

+ 8 - 0
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelModel.js

@@ -0,0 +1,8 @@
+Ext.define('saas.view.purchase.purchaseIn.FormPanelModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.purchase-purchasein-formpanel',
+    
+    data: {
+        pi_class: '采购验收单'
+     }
+});

+ 2 - 2
frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js

@@ -2,8 +2,8 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
     extend: 'saas.view.core.query.QueryPanel',
     xtype: 'purchase-purchasein-querypanel',
 
-    controller: 'purchase-purchasein-queryformcontroller',
-    viewModel: 'purchase-purchasein-queryformmodel',
+    controller: 'purchase-purchasein-querypanel',
+    viewModel: 'purchase-purchasein-querypanel',
 
     viewName: 'purchase-purchasein-querypanel',
 

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

@@ -1,6 +1,7 @@
 Ext.define('saas.view.purchase.purchaseIn.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
-    alias: 'controller.purchase-purchasein-queryformcontroller',
+    alias: 'controller.purchase-purchasein-querypanel',
+    
     init: function (form) {
         var me = this;
         this.control({

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

@@ -1,5 +1,5 @@
 Ext.define('saas.view.purchase.purchaseIn.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.purchase-purchasein-queryformmodel'
+    alias: 'viewmodel.purchase-purchasein-querypanel'
 
 });

+ 0 - 7
frontend/saas-web/app/view/purchase/purchaseOut/FormModel.js

@@ -1,7 +0,0 @@
-Ext.define('saas.view.purchase.purchaseOut.FormModel', {
-    extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.purchase-purchaseout-formmodel',
-    data: {
-        pi_class: '采购验退单'
-     }
-});

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

@@ -2,8 +2,8 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
     xtype: 'purchase-purchaseout-formpanel',
 
-    controller: 'purchase-purchaseout-formcontroller',
-    viewModel: 'purchase-purchaseout-formmodel',
+    controller: 'purchase-purchaseout-formpanel',
+    viewModel: 'purchase-purchaseout-formpanel',
     
     caller:'PurchaseOut',
     

+ 2 - 2
frontend/saas-web/app/view/purchase/purchaseOut/FormController.js → frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -1,6 +1,6 @@
-Ext.define('saas.view.purchase.purchaseOut.FormController', {
+Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.purchase-purchaseout-formcontroller',
+    alias: 'controller.purchase-purchaseout-formpanel',
     init: function (form) {
         var me = this;
         this.control({

+ 7 - 0
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelModel.js

@@ -0,0 +1,7 @@
+Ext.define('saas.view.purchase.purchaseOut.FormPanelModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.purchase-purchaseout-formpanel',
+    data: {
+        pi_class: '采购验退单'
+     }
+});

+ 2 - 2
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanel.js

@@ -2,8 +2,8 @@ Ext.define('saas.view.purchase.purchaseOut.QueryPanel', {
     extend: 'saas.view.core.query.QueryPanel',
     xtype: 'purchase-purchaseout-querypanel',
 
-    controller: 'purchase-purchaseout-queryformcontroller',
-    viewModel: 'purchase-purchaseout-queryformmodel',
+    controller: 'purchase-purchaseout-querypanel',
+    viewModel: 'purchase-purchaseout-querypanel',
 
     viewName: 'purchase-purchaseout-querypanel',
 

+ 2 - 1
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelController.js

@@ -1,6 +1,7 @@
 Ext.define('saas.view.purchase.purchaseOut.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
-    alias: 'controller.purchase-purchaseout-queryformcontroller',
+    alias: 'controller.purchase-purchaseout-querypanel',
+    
     init: function (form) {
         var me = this;
         this.control({

+ 1 - 1
frontend/saas-web/app/view/purchase/purchaseOut/QueryPanelModel.js

@@ -1,4 +1,4 @@
 Ext.define('saas.view.purchase.purchaseOut.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.purchase-purchaseout-queryformmodel'
+    alias: 'viewmodel.purchase-purchaseout-querypanel'
 });

+ 0 - 5
frontend/saas-web/app/view/sale/sale/FormModel.js

@@ -1,5 +0,0 @@
-Ext.define('saas.view.sale.sale.FormModel', {
-    extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.sale-sale-formmodel',
-
-});

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

@@ -2,8 +2,8 @@ Ext.define('saas.view.sale.sale.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
     xtype: 'sale-sale-formpanel',
 
-    controller: 'sale-sale-formcontroller',
-    viewModel: 'sale-sale-formmodel',
+    controller: 'sale-sale-formpanel',
+    viewModel: 'sale-sale-formpanel',
     
     caller:'Sale',
     

+ 2 - 2
frontend/saas-web/app/view/sale/sale/FormController.js → frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -1,6 +1,6 @@
-Ext.define('saas.view.sale.sale.FormController', {
+Ext.define('saas.view.sale.sale.FormPanelController', {
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.sale-sale-formcontroller',
+    alias: 'controller.sale-sale-formpanel',
     init: function (form) {
         var me = this;
         this.control({

+ 5 - 0
frontend/saas-web/app/view/sale/sale/FormPanelModel.js

@@ -0,0 +1,5 @@
+Ext.define('saas.view.sale.sale.FormPanelModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.sale-sale-formpanel',
+
+});

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

@@ -2,8 +2,8 @@ Ext.define('saas.view.sale.saleIn.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
     xtype: 'sale-salein-formpanel',
 
-    controller: 'sale-salein-formcontroller',
-    viewModel: 'sale-salein-formmodel',
+    controller: 'sale-salein-formpanel',
+    viewModel: 'sale-salein-formpanel',
     caller:'SaleIn',
     
      //字段属性

+ 2 - 2
frontend/saas-web/app/view/sale/saleIn/FormController.js → frontend/saas-web/app/view/sale/saleIn/FormPanelController.js

@@ -1,6 +1,6 @@
-Ext.define('saas.view.sale.saleIn.FormController', {
+Ext.define('saas.view.sale.saleIn.FormPanelController', {
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.sale-salein-formcontroller',
+    alias: 'controller.sale-salein-formpanel',
     init: function (form) {
         var me = this;
         this.control({

+ 2 - 2
frontend/saas-web/app/view/sale/saleIn/FormModel.js → frontend/saas-web/app/view/sale/saleIn/FormPanelModel.js

@@ -1,6 +1,6 @@
-Ext.define('saas.view.sale.saleIn.FormModel', {
+Ext.define('saas.view.sale.saleIn.FormPanelModel', {
     extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.sale-salein-formmodel',
+    alias: 'viewmodel.sale-salein-formpanel',
     data: {
         pi_class: '销售退货单'
      }

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

@@ -2,8 +2,8 @@ Ext.define('saas.view.sale.saleIn.QueryPanel', {
     extend: 'saas.view.core.query.QueryPanel',
     xtype: 'sale-salein-querypanel',
 
-    controller: 'sale-salein-queryformcontroller',
-    viewModel: 'sale-salein-queryformmodel',
+    controller: 'sale-salein-querypanel',
+    viewModel: 'sale-salein-querypanel',
 
     viewName: 'sale-salein-querypanel',
 

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

@@ -1,6 +1,6 @@
 Ext.define('saas.view.sale.saleIn.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
-    alias: 'controller.sale-salein-queryformcontroller',
+    alias: 'controller.sale-salein-querypanel',
     init: function (form) {
         var me = this;
         this.control({

+ 1 - 1
frontend/saas-web/app/view/sale/saleIn/QueryPanelModel.js

@@ -1,5 +1,5 @@
 Ext.define('saas.view.sale.saleIn.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.sale-salein-queryformmodel'
+    alias: 'viewmodel.sale-salein-querypanel'
 
 });

+ 0 - 7
frontend/saas-web/app/view/sale/saleOut/FormModel.js

@@ -1,7 +0,0 @@
-Ext.define('saas.view.sale.saleout.FormModel', {
-    extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.sale-saleout-formmodel',
-    data: {
-        pi_class: '销售出货单'
-     }
-});

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

@@ -2,8 +2,8 @@ Ext.define('saas.view.sale.saleout.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
     xtype: 'sale-saleout-formpanel',
 
-    controller: 'sale-saleout-formcontroller',
-    viewModel: 'sale-saleout-formmodel',
+    controller: 'sale-saleout-formpanel',
+    viewModel: 'sale-saleout-formpanel',
 
     viewName: 'sale-saleout-formpanel',
     

+ 3 - 2
frontend/saas-web/app/view/sale/saleOut/FormController.js → frontend/saas-web/app/view/sale/saleOut/FormPanelController.js

@@ -1,6 +1,7 @@
-Ext.define('saas.view.sale.saleout.FormController', {
+Ext.define('saas.view.sale.saleout.FormPanelController', {
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.sale-saleout-formcontroller',
+    alias: 'controller.sale-saleout-formpanel',
+    
     init: function (form) {
         var me = this;
         this.control({

+ 8 - 0
frontend/saas-web/app/view/sale/saleOut/FormPanelModel.js

@@ -0,0 +1,8 @@
+Ext.define('saas.view.sale.saleout.FormPanelModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.sale-saleout-formpanel',
+    
+    data: {
+        pi_class: '销售出货单'
+     }
+});

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

@@ -2,8 +2,8 @@ Ext.define('saas.view.sale.saleout.QueryPanel', {
     extend: 'saas.view.core.query.QueryPanel',
     xtype: 'sale-saleout-querypanel',
 
-    controller: 'sale-saleout-queryformcontroller',
-    viewModel: 'sale-saleout-queryformmodel',
+    controller: 'sale-saleout-querypanel',
+    viewModel: 'sale-saleout-querypanel',
     
     viewName: 'sale-saleout-querypanel',
 

+ 2 - 1
frontend/saas-web/app/view/sale/saleOut/QueryPanelController.js

@@ -1,6 +1,7 @@
 Ext.define('saas.view.sale.saleout.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
-    alias: 'controller.sale-saleout-queryformcontroller',
+    alias: 'controller.sale-saleout-querypanel',
+
     init: function (form) {
         var me = this;
         this.control({

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

@@ -1,4 +1,4 @@
 Ext.define('saas.view.sale.saleout.QueryPanelModel', {
     extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.sale-saleout-queryformmodel'
+    alias: 'viewmodel.sale-saleout-querypanel'
 });

+ 56 - 87
frontend/saas-web/app/view/storage/prodInOutOtherIn/FormPanel.js → frontend/saas-web/app/view/stock/otherIn/FormPanel.js

@@ -1,18 +1,18 @@
-Ext.define('saas.view.storage.prodInOutOtherIn.FormPanel', {
+Ext.define('saas.view.stock.otherIn.FormPanel', {
     extend: 'saas.view.core.form.FormPanel',
-    xtype: 'storage-prodinoutotherin-formpanel',
+    xtype: 'stock-otherin-formpanel',
 
-    controller: 'storage-prodinoutotherin-formcontroller',
-    viewModel: 'storage-prodinoutotherin-formmodel',
+    controller: 'stock-otherin-formpanel',
+    viewModel: 'stock-otherin-formpanel',
     
      //字段属性
-     _title:'采购单',
+     _title:'其它入库单',
      _idField: 'id',
-     _codeField: 'pu_code',
-     _statusField: 'pu_status',
-     _statusCodeField: 'pu_statuscode',
-     _detnoColumn:  'pd_detno',
-     _relationColumn: 'pd_puid',
+     _codeField: 'pi_inoutno',
+     _statusField: 'pi_status',
+     _statusCodeField: 'pi_statuscode',
+     _detnoColumn:  'pd_pdno',
+     _relationColumn: 'pd_piid',
      _readUrl:'http://localhost:8800/purchase/read/',
      _saveUrl:'http://localhost:8800/purchase/save',
      _auditUrl:'http://localhost:8800/purchase/audit',
@@ -23,7 +23,7 @@ Ext.define('saas.view.storage.prodInOutOtherIn.FormPanel', {
  
      toolBtns: [{
          xtype: 'button',
-         text: '转验收单按钮',
+         text: '转其他出库',
          handler: 'turnIn'
      }],
 
@@ -34,75 +34,39 @@ Ext.define('saas.view.storage.prodInOutOtherIn.FormPanel', {
         fieldLabel: 'id',
         allowBlank: true,
         columnWidth: 0
-    }, {
-        xtype : "textfield", 
-        name : "pu_code", 
-        bind : "{pu_code}", 
-        fieldLabel : "采购单号", 
-        allowBlank : true, 
-        columnWidth : 0.25
-    }, {
+    },{
         xtype : "hidden", 
-        name : "pu_vendid", 
-        bind : "{pu_vendid}", 
+        name : "pi_vendid", 
+        bind : "{pi_vendid}", 
         fieldLabel : "供应商ID", 
         allowBlank : true, 
         columnWidth : 0.0
     }, {
         xtype : "textfield", 
-        name : "pu_vendcode", 
-        bind : "{pu_vendcode}", 
+        name : "pi_vendcode", 
+        bind : "{pi_vendcode}", 
         fieldLabel : "供应商编号", 
         hidden:true,
         allowBlank : true, 
         columnWidth : 0, 
     }, {
         xtype : "dbfindtrigger", 
-        name : "pu_vendname", 
-        bind : "{pu_vendname}", 
+        name : "pi_vendname", 
+        bind : "{pi_vendname}", 
         fieldLabel : "供应商名称", 
         allowBlank : true, 
         columnWidth : 0.25
-    },{
-        xtype : "datefield", 
-        name : "pu_date", 
-        bind : "{pu_date}", 
-        fieldLabel : "采购日期", 
-        allowBlank : false, 
-        columnWidth : 0.25
-    }, {
-        xtype : "hidden", 
-        name : "pu_buyerid", 
-        bind : "{pu_buyerid}", 
-        fieldLabel : "采购员ID", 
-        allowBlank : true, 
-        columnWidth : 0.0
-    }, {
-        xtype : "textfield", 
-        name : "pu_buyercode", 
-        bind : "{pu_buyercode}", 
-        fieldLabel : "采购员编号", 
-        allowBlank : true, 
-        hidden:true,
-        columnWidth : 0
-    }, {
-        xtype : "dbfindtrigger", 
-        name : "pu_buyername", 
-        bind : "{pu_buyername}", 
-        fieldLabel : "采购员名称", 
-        allowBlank : true, 
-        columnWidth : 0.25
     }, {
-        xtype : "textfield", 
-        name : "pu_shipaddresscode", 
-        bind : "{pu_shipaddresscode}", 
-        fieldLabel : "交货地址", 
+        xtype : "datefield", 
+        name : "pi_date", 
+        bind : "{pi_date}", 
+        fieldLabel : "单据日期", 
         allowBlank : true, 
         columnWidth : 0.25
-    }, {
-        xtype : "textfield", 
-        name : "pu_total", 
-        bind : "{pu_total}", 
+    },{
+        xtype : "numberfield", 
+        name : "pi_total", 
+        bind : "{pi_total}", 
         fieldLabel : "单据金额", 
         allowBlank : true, 
         columnWidth : 0.25
@@ -112,7 +76,7 @@ Ext.define('saas.view.storage.prodInOutOtherIn.FormPanel', {
         columns : [
             {
                 text : "序号", 
-                dataIndex : "pd_detno", 
+                dataIndex : "pd_pdno", 
                 width : 100, 
                 xtype : "numbercolumn",
                 align : 'center',
@@ -124,7 +88,13 @@ Ext.define('saas.view.storage.prodInOutOtherIn.FormPanel', {
             }, {
                 text : "id", 
                 dataIndex : "id", 
-                xtype : "numbercolumn"
+                xtype : "numbercolumn",
+                hidden:true
+            },{
+                text : "pd_piid", 
+                dataIndex : "id", 
+                xtype : "numbercolumn",
+                hidden:true
             },
             {
                 text : "物料编号", 
@@ -156,6 +126,11 @@ Ext.define('saas.view.storage.prodInOutOtherIn.FormPanel', {
                 dataIndex : "pr_spec",
                 ignore:true
             },
+            {
+                text : "单位", 
+                dataIndex : "pr_unit",
+                ignore:true
+            },
             {
                 text : "数量", 
                 dataIndex : "pd_qty", 
@@ -202,32 +177,26 @@ Ext.define('saas.view.storage.prodInOutOtherIn.FormPanel', {
                 xtype : "numbercolumn", 
                 items : null
             },
-            {
-                text : "含税金额", 
-                dataIndex : "pd_total", 
-                width : 120.0, 
-                xtype : "numbercolumn"
-            }, 
             {
                 text : "未税金额", 
                 dataIndex : "pd_taxtotal", 
                 xtype : "numbercolumn"
-            },{
-                text : "需求日期", 
-                dataIndex : "pd_delivery", 
-                flex : 1.0, 
-                xtype:'datecolumn',
-                format : "Y-m-d H:i:s", 
-                editor : {
-                    xtype : "datefield",
-                    editable : true, 
-                    format : "Y-m-d H:i:s", 
-                    hideTrigger : false
-                }
             },
             {
-                text : "关联销售单号", 
-                dataIndex : "pd_salecode", 
+                text : "销售单明细id", 
+                dataIndex : "pd_sdid", 
+                width : 120.0,
+                flex : 1.0,
+                hidden:true
+
+            },{
+                text : "销售单单号", 
+                dataIndex : "pd_sdid", 
+                width : 120.0,
+                flex : 1.0
+            },{
+                text : "销售序号", 
+                dataIndex : "pd_sdid", 
                 width : 120.0,
                 flex : 1.0
             }
@@ -252,7 +221,7 @@ Ext.define('saas.view.storage.prodInOutOtherIn.FormPanel', {
         readOnly : true, 
         editable : false, 
         name : "pu_status", 
-        bind : "{pu_status}", 
+        bind : "{pi_status}", 
         fieldLabel : "单据状态", 
         allowBlank : true, 
         columnWidth : 0.25
@@ -260,8 +229,8 @@ Ext.define('saas.view.storage.prodInOutOtherIn.FormPanel', {
         xtype : "hidden", 
         readOnly : true, 
         editable : false, 
-        name : "pu_statuscode", 
-        bind : "{pu_statuscode}", 
+        name : "pi_statuscode", 
+        bind : "{pi_statuscode}", 
         fieldLabel : "单据状态码", 
         allowBlank : true, 
         columnWidth : 0.0

+ 3 - 2
frontend/saas-web/app/view/storage/prodInOutOtherIn/FormController.js → frontend/saas-web/app/view/stock/otherIn/FormPanelController.js

@@ -1,6 +1,7 @@
-Ext.define('saas.view.storage.prodInOutOtherIn.FormController', {
+Ext.define('saas.view.stock.otherIn.FormPanelController', {
     extend: 'saas.view.core.form.FormPanelController',
-    alias: 'controller.storage-prodinoutotherin-formcontroller',
+    alias: 'controller.stock-otherin-formpanel',
+    
     init: function (form) {
         var me = this;
         this.control({

+ 5 - 0
frontend/saas-web/app/view/stock/otherIn/FormPanelModel.js

@@ -0,0 +1,5 @@
+Ext.define('saas.view.stock.otherIn.FormPanelModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.stock-otherin-formpanel',
+
+});

+ 5 - 5
frontend/saas-web/app/view/storage/prodInOutOtherIn/QueryPanel.js → frontend/saas-web/app/view/stock/otherIn/QueryPanel.js

@@ -1,11 +1,11 @@
-Ext.define('saas.view.storage.prodInOutOtherIn.QueryPanel', {
+Ext.define('saas.view.stock.otherIn.QueryPanel', {
     extend: 'saas.view.core.query.QueryPanel',
-    xtype: 'storage-prodInOutOtherIn-querypanel',
+    xtype: 'stock-otherin-querypanel',
 
-    controller: 'storage-prodinoutotherin-querypanel',
-    viewModel: 'storage-prodinoutotherin-querypanel',
+    controller: 'stock-otherin-querypanel',
+    viewModel: 'stock-otherin-querypanel',
 
-    viewName: 'storage-prodinoutotherin-querypanel',
+    viewName: 'stock-otherin-querypanel',
 
     queryFormItems: [{
         xtype: 'hidden',

+ 2 - 2
frontend/saas-web/app/view/storage/prodInOutOtherIn/QueryPanelController.js → frontend/saas-web/app/view/stock/otherIn/QueryPanelController.js

@@ -1,6 +1,6 @@
-Ext.define('saas.view.storage.prodInOutOtherIn.QueryPanelController', {
+Ext.define('saas.view.stock.otherIn.QueryPanelController', {
     extend: 'saas.view.core.query.QueryPanelController',
-    alias: 'controller.storage-prodinoutotherin-querypanel',
+    alias: 'controller.stock-otherin-querypanel',
     init: function (form) {
         var me = this;
         this.control({

+ 5 - 0
frontend/saas-web/app/view/stock/otherIn/QueryPanelModel.js

@@ -0,0 +1,5 @@
+Ext.define('saas.view.stock.otherIn.QueryPanelModel', {
+    extend: 'saas.view.core.query.QueryPanelModel',
+    alias: 'viewmodel.stock-otherin-querypanel'
+
+});

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

@@ -0,0 +1,234 @@
+Ext.define('saas.view.stock.otherOut.FormPanel', {
+    extend: 'saas.view.core.form.FormPanel',
+    xtype: 'stock-otherout-formpanel',
+
+    controller: 'stock-otherout-formpanel',
+    viewModel: 'stock-otherout-formpanel',
+    
+     //字段属性
+     _title:'其它入库单',
+     _idField: 'id',
+     _codeField: 'pi_inoutno',
+     _statusField: 'pi_status',
+     _statusCodeField: 'pi_statuscode',
+     _detnoColumn:  'pd_pdno',
+     _relationColumn: 'pd_piid',
+     _readUrl:'http://localhost:8800/purchase/read/',
+     _saveUrl:'http://localhost:8800/purchase/save',
+     _auditUrl:'http://localhost:8800/purchase/audit',
+     _deleteUrl:'http://localhost:8800/purchase/delete/',
+     _deleteDetailUrl:'http://localhost:8800/purchase/deleteItem/',
+     _turnInUrl:'http://localhost:8800/purchase/turnProdin/',
+     initId:0,
+ 
+     toolBtns: [],
+
+    defaultItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        bind: '{id}',
+        fieldLabel: 'id',
+        allowBlank: true,
+        columnWidth: 0
+    },{
+        xtype : "hidden", 
+        name : "pi_vendid", 
+        bind : "{pi_vendid}", 
+        fieldLabel : "供应商ID", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }, {
+        xtype : "textfield", 
+        name : "pi_vendcode", 
+        bind : "{pi_vendcode}", 
+        fieldLabel : "供应商编号", 
+        hidden:true,
+        allowBlank : true, 
+        columnWidth : 0, 
+    }, {
+        xtype : "dbfindtrigger", 
+        name : "pi_vendname", 
+        bind : "{pi_vendname}", 
+        fieldLabel : "供应商名称", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "datefield", 
+        name : "pi_date", 
+        bind : "{pi_date}", 
+        fieldLabel : "单据日期", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "numberfield", 
+        name : "pi_total", 
+        bind : "{pi_total}", 
+        fieldLabel : "单据金额", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        name : "detailGridField", 
+        xtype : "detailGridField", 
+        columns : [
+            {
+                text : "序号", 
+                dataIndex : "pd_pdno", 
+                width : 100, 
+                xtype : "numbercolumn",
+                align : 'center',
+                format:'0',
+                summaryType: 'count',
+                summaryRenderer: function(value, summaryData, dataIndex) {
+                    return Ext.String.format('合计: {0}条', value);
+                },
+            }, {
+                text : "id", 
+                dataIndex : "id", 
+                xtype : "numbercolumn",
+                hidden:true
+            },{
+                text : "pd_piid", 
+                dataIndex : "id", 
+                xtype : "numbercolumn",
+                hidden:true
+            },
+            {
+                text : "物料编号", 
+                width : 200.0, 
+                dataIndex : "pd_prodcode", 
+                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"
+                }
+            },
+            {
+                text : "名称", 
+                dataIndex : "pr_detail",
+                ignore:true
+            },
+            {
+                text : "规格", 
+                dataIndex : "pr_spec",
+                ignore:true
+            },
+            {
+                text : "单位", 
+                dataIndex : "pr_unit",
+                ignore:true
+            },
+            {
+                text : "数量", 
+                dataIndex : "pd_qty", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                format:'0',
+                items : null,
+                summaryType: 'sum'
+            },
+            {
+                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 : "税率", 
+                editor : {
+                    xtype : "numberfield"
+                },
+                dataIndex : "pd_taxrate", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            },
+            {
+                text : "未税金额", 
+                dataIndex : "pd_taxtotal", 
+                xtype : "numbercolumn"
+            },
+            {
+                text : "销售单明细id", 
+                dataIndex : "pd_sdid", 
+                width : 120.0,
+                flex : 1.0,
+                hidden:true
+
+            },{
+                text : "销售单单号", 
+                dataIndex : "pd_sdid", 
+                width : 120.0,
+                flex : 1.0
+            },{
+                text : "销售序号", 
+                dataIndex : "pd_sdid", 
+                width : 120.0,
+                flex : 1.0
+            }
+        ]
+    }, {
+        format : "Y-m-d", 
+        xtype : "datefield", 
+        name : "createTime", 
+        bind : "{createTime}", 
+        fieldLabel : "创建时间", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "datefield", 
+        name : "updateTime", 
+        bind : "{updateTime}", 
+        fieldLabel : "更新时间", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        readOnly : true, 
+        editable : false, 
+        name : "pu_status", 
+        bind : "{pi_status}", 
+        fieldLabel : "单据状态", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        readOnly : true, 
+        editable : false, 
+        name : "pi_statuscode", 
+        bind : "{pi_statuscode}", 
+        fieldLabel : "单据状态码", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }]
+});

+ 157 - 0
frontend/saas-web/app/view/stock/otherOut/FormPanelController.js

@@ -0,0 +1,157 @@
+Ext.define('saas.view.stock.otherOut.FormPanelController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.stock-otherout-formpanel',
+    init: function (form) {
+        var me = this;
+        this.control({
+            /**放大镜新增demo*/
+            "field[name=combo]":{
+                beforerender:function(f){
+                    f.addHandler=me.addCombo;
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pu_vendcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        dbfinds:[{
+                            from:'ve_code',to:'pu_vendcode'
+                        },{
+                            from:'ve_name',to:'pu_vendname'
+                        }],
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        dbColumns:[{
+                            conditionCode:'ve_id',
+                            "text": "供应商ID",
+                            "flex": 0,
+                            "dataIndex": "ve_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            conditionCode:'ve_code',
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "ve_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_name',
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "ve_name",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_type',
+                            "text": "供应商类型",
+                            "flex": 0,
+                            "dataIndex": "ve_type",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        conditionCode:'pr_code',
+                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode'
+                        }],
+                        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
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    },
+    addCombo:function(){
+        var combo=this.ownerCmp;
+        Ext.create('Ext.window.Window',{
+            layout:'vbox',
+            bodyPadding: 15,
+            width:500,
+            items:[{
+                fieldLabel:'实际值',
+                xtype:'textfield'
+            },{
+                fieldLabel:'显示值',
+                xtype:'textfield'
+            }],
+            buttons:[{
+                text:'确认',
+                handler:function(b){
+                    combo.setValue('ok');
+                    b.up('window').close();
+                }
+            }],
+            renderTo:this.ownerCmp.ownerCt.getEl()
+        }).show();
+
+    },
+
+    turnIn: function() {
+        var me = this,
+        form = me.getView(),
+        id = form.getForm().findField(form._idField);
+        form.BaseUtil.request({
+            url: form._turnInUrl+id.value,
+            method: 'GET',
+        })
+        .then(function(res) {
+            var localJson = new Ext.decode(res.responseText);
+            if(localJson.success){
+                Ext.Msg.alert('提示','转单成功');
+              
+            }
+        })
+        .catch(function() {
+            Ext.Msg.alert('提示','转单失败');
+        });
+     }
+});

+ 5 - 0
frontend/saas-web/app/view/stock/otherOut/FormPanelModel.js

@@ -0,0 +1,5 @@
+Ext.define('saas.view.stock.otherOut.FormPanelModel', {
+    extend: 'saas.view.core.form.FormPanelModel',
+    alias: 'viewmodel.stock-otherout-formpanel',
+
+});

+ 212 - 0
frontend/saas-web/app/view/stock/otherOut/QueryPanel.js

@@ -0,0 +1,212 @@
+Ext.define('saas.view.stock.otherOut.QueryPanel', {
+    extend: 'saas.view.core.query.QueryPanel',
+    xtype: 'stock-otherout-querypanel',
+
+    controller: 'stock-otherout-querypanel',
+    viewModel: 'stock-otherout-querypanel',
+
+    viewName: 'stock-otherout-querypanel',
+
+    queryFormItems: [{
+        xtype: 'hidden',
+        name: 'pu_id',
+        bind: '{pu_id}',
+        fieldLabel: 'ID',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype: 'textfield',
+        name: 'pu_code',
+        bind: '{pu_code}',
+        fieldLabel: '单据编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_date',
+        bind: '{pu_date}',
+        fieldLabel: '采购日期',
+        allowBlank: true,
+        columnWidth: 0.5
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pu_vendcode',
+        bind: '{pu_vendcode}',
+        fieldLabel: '供应商编号',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'pu_vendname',
+        bind: '{pu_vendname}',
+        fieldLabel: '供应商名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode#pd_prodcode',
+        //#pr_detail
+        bind: '{pd_prodcode}',
+        fieldLabel: '物料编号',
+        fieldMode: 'DETAIL',
+        queryType: 'VAG',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'textfield',
+        name: 'pr_detail',
+        bind: '{pr_detail}',
+        fieldLabel: '物料名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'combobox',
+        name: 'pu_statuscode',
+       // bind: '{pu_statuscode}',
+        fieldLabel: '审核状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        queryMode: 'local',
+        displayField: 'pu_status',
+        valueField: 'pu_statuscode',
+        editable:false,
+        store: Ext.create('Ext.data.ArrayStore', {
+        fields: ['pu_statuscode', 'pu_status'],
+        data: [
+            ["$ALL", "全部"],
+            ["AUDITED", "已审核"],
+            ["UNAUDITED", "未审核"]
+        ]
+        })
+    }, {
+        xtype: 'multicombo',
+        name: 'pu_acceptstatuscode',
+        bind: '{pu_acceptstatuscode}',
+        fieldLabel: '入库状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        datas: [
+            ["TURNIN", "已入库"],
+            ["UNTURNIN", "未入库"],
+            ["PARTIN", "部分入库"]
+        ]
+    }],
+    moreQueryFormItems: [{
+        xtype: 'textfield',
+        name: 'pu_buyername',
+        bind: '{pu_buyername}',
+        fieldLabel: '采购员',
+        allowBlank: true
+    }, {
+        xtype: 'textfield',
+        name: 'pu_total',
+        bind: '{pu_total}',
+        fieldLabel: '金额',
+        allowBlank: true
+    }, {
+        xtype: 'condatefield',
+        name: 'pu_delivery',
+        bind: '{pu_delivery}',
+        fieldLabel: '交货日期',
+        allowBlank: true,
+        columnWidth: 1
+    }],
+    queryGridConfig: {
+        idField: 'pu_id',
+        codeField: 'pu_code',
+        addTitle: '采购单',
+        addXtype: 'purchase-purchase-formpanel',
+        defaultCondition:'',
+        baseVastUrl: 'http://localhost:8800/purchase/',
+        baseColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'pu_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pu_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pu_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pu_indate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '供应商名称',
+            dataIndex: 'pu_vendname',
+            width: 120
+        }, {
+            text: '含税金额',
+            dataIndex: 'pu_taxtotal',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '金额',
+            dataIndex: 'pu_total',
+            xtype: 'numbercolumn',
+            width: 120,
+            flex: 1
+        }],
+        relativeColumn: [{
+            text: '序号',
+            width: 80,
+            xtype: 'rownumberer'
+        }, {
+            text: 'id',
+            dataIndex: 'pu_id',
+            width: 100,
+            xtype: 'numbercolumn'
+        }, {
+            text: '单据编号',
+            dataIndex: 'pu_code',
+            width: 120
+        }, {
+            text: '单据状态',
+            dataIndex: 'pu_status',
+            width: 120
+        }, {
+            text: '下单日期',
+            dataIndex: 'pu_indate',
+            xtype: 'datecolumn',
+            width: 200
+        }, {
+            text: '供应商名称',
+            dataIndex: 'pu_vendname',
+            width: 120
+        }, {
+            text: '采购序号',
+            dataIndex: 'pd_detno',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '物料编号',
+            dataIndex: 'pd_prodcode',
+            width: 120
+        }, {
+            text: '数量',
+            dataIndex: 'pd_qty',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '单价',
+            dataIndex: 'pd_price',
+            xtype: 'numbercolumn',
+            width: 120
+        }, {
+            text: '已转数',
+            dataIndex: 'pd_ytqy',
+            xtype: 'numbercolumn',
+            width: 120,
+            flex: 1
+        }]
+    }
+});

+ 115 - 0
frontend/saas-web/app/view/stock/otherOut/QueryPanelController.js

@@ -0,0 +1,115 @@
+Ext.define('saas.view.stock.otherOut.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.stock-otherout-querypanel',
+    init: function (form) {
+        var me = this;
+        this.control({
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pu_vendname]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+                        dbfinds:[{
+                            from:'ve_code',to:'pu_vendcode'
+                        },{
+                            from:'ve_name',to:'pu_vendname'
+                        }],
+                        dbtpls:[{
+                            field:'ve_code',width:100
+                        },{
+                            field:'ve_name',width:100
+                        }],
+                        dbColumns:[{
+                            conditionCode:'ve_id',
+                            "text": "供应商ID",
+                            "flex": 0,
+                            "dataIndex": "ve_id",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            conditionCode:'ve_code',
+                            "text": "供应商编号",
+                            "flex": 1,
+                            "dataIndex": "ve_code",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_name',
+                            "text": "供应商名称",
+                            "flex": 1,
+                            "dataIndex": "ve_name",
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            conditionCode:'ve_type',
+                            "text": "供应商类型",
+                            "flex": 0,
+                            "dataIndex": "ve_type",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            },
+            //放大镜赋值关系 以及 tpl模板
+            'dbfindtrigger[name=pd_prodcode]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        conditionCode:'pr_code',
+                        dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
+                        dbfinds:[{
+                            from:'pr_code',to:'pd_prodcode',
+                            from:'pr_detail',to:'pr_detail'
+                        }],
+                        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
+                        }, {
+                            "text": "物料单位",
+                            "flex": 0,
+                            "dataIndex": "pr_unit",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
+                        }]
+                    }) ;   
+
+                }
+            }
+        });
+
+    }
+});

+ 5 - 0
frontend/saas-web/app/view/stock/otherOut/QueryPanelModel.js

@@ -0,0 +1,5 @@
+Ext.define('saas.view.stock.otherOut.QueryPanelModel', {
+    extend: 'saas.view.core.query.QueryPanelModel',
+    alias: 'viewmodel.stock-otherout-querypanel'
+
+});

+ 0 - 5
frontend/saas-web/app/view/storage/prodInOutOtherIn/FormModel.js

@@ -1,5 +0,0 @@
-Ext.define('saas.view.storage.prodInOutOtherIn.FormModel', {
-    extend: 'saas.view.core.form.FormPanelModel',
-    alias: 'viewmodel.storage-prodinoutotherin-formmodel',
-
-});

+ 0 - 5
frontend/saas-web/app/view/storage/prodInOutOtherIn/QueryPanelModel.js

@@ -1,5 +0,0 @@
-Ext.define('saas.view.storage.prodInOutOtherIn.QueryPanelModel', {
-    extend: 'saas.view.core.query.QueryPanelModel',
-    alias: 'viewmodel.storage-prodinoutotherin-querypanel'
-
-});

+ 16 - 0
frontend/saas-web/app/view/test/test/Myv.js

@@ -0,0 +1,16 @@
+
+Ext.define('saas.view.test.test.Myv',{
+    extend: 'Ext.panel.Panel',
+
+    requires: [
+        'saas.view.test.test.MyvController',
+        'saas.view.test.test.MyvModel'
+    ],
+
+    controller: 'test-test-myv',
+    viewModel: {
+        type: 'test-test-myv'
+    },
+
+    html: 'Hello, World!!'
+});

+ 5 - 0
frontend/saas-web/app/view/test/test/MyvController.js

@@ -0,0 +1,5 @@
+Ext.define('saas.view.test.test.MyvController', {
+    extend: 'Ext.app.ViewController',
+    alias: 'controller.test-test-myv'
+
+});

+ 8 - 0
frontend/saas-web/app/view/test/test/MyvModel.js

@@ -0,0 +1,8 @@
+Ext.define('saas.view.test.test.MyvModel', {
+    extend: 'Ext.app.ViewModel',
+    alias: 'viewmodel.test-test-myv',
+    data: {
+        name: 'saas'
+    }
+
+});

+ 0 - 3
frontend/saas-web/packages/local/theme-default/resources/Readme.md

@@ -1,3 +0,0 @@
-# theme-default/resources
-
-This folder contains static resources (typically an `"images"` folder as well).

+ 0 - 7
frontend/saas-web/resources/json/customer.json

@@ -1,7 +0,0 @@
-[{
-  "ck_id":1,
-  "ck_kind":"kind1"
-},{
-  "ck_id":2,
-  "ck_kind":"kind2"
-}]

+ 0 - 17
frontend/saas-web/resources/json/detailGridColumns1.json

@@ -1,17 +0,0 @@
-[{
-    "text": "列1",
-    "dataIndex": "col1",
-    "width": 100
-}, {
-    "text": "列2",
-    "dataIndex": "col2",
-    "width": 200
-}, {
-    "text": "列3",
-    "dataIndex": "col3",
-    "width": 400
-}, {
-    "text": "列4",
-    "dataIndex": "col4",
-    "width": 600
-}]

+ 0 - 85
frontend/saas-web/resources/json/formItems.json

@@ -1,85 +0,0 @@
-{
-    "success": true,
-    "code": 0,
-    "message": null,
-    "data": {
-        "xtype": "formpanel",
-        "items": [ {
-            "xtype": "dbfindtrigger",
-            "configUrl":"resources/json/purchase/vendorColumnsDbfind.json",
-            "dataUrl":"resources/json/purchase/vendorDataDbfind.json",   
-            "name": "pu_vendorcode",
-            "bind": "{pu_vendorcode}",
-            "fieldLabel": "供应商编号",
-            "allowBlank": true,
-            "columnWidth": 0.25
-        }, {
-            "xtype": "textfield",
-            "name": "pu_vendorname",
-            "bind": "{pu_vendorname}",
-            "fieldLabel": "供应商简称",
-            "allowBlank": true,
-            "columnWidth": 0.25
-        }, {
-            "xtype": "textfield",
-            "name": "text",
-            "bind": "{text}",
-            "fieldLabel": "文本",
-            "allowBlank": true,
-            "columnWidth": 1
-        }, {
-            "xtype": "numberfield",
-            "name": "num1",
-            "bind": "{num1}",
-            "fieldLabel": "加数",
-            "allowBlank": false,
-            "columnWidth": 0.5
-        }, {
-            "xtype": "numberfield",
-            "name": "num2",
-            "bind": "{num2}",
-            "fieldLabel": "加数",
-            "allowBlank": false,
-            "columnWidth": 0.5
-        }, {
-            "xtype": "numberfield",
-            "name": "sum",
-            "bind": "{sum}",
-            "fieldLabel": "和",
-            "allowBlank": false,
-            "columnWidth": 1
-        }, {
-            "xtype": "detailGridField",
-            "columnWidth": 1,
-            "configUrl": "resources/json/detailGridColumns1.json"
-        }, {
-            "xtype": "datefield",
-            "name": "createTime",
-            "bind": "{createTime}",
-            "fieldLabel": "制单日期",
-            "allowBlank": true,
-            "columnWidth": 0.25 
-        }, {
-            "xtype": "textfield",
-            "name": "creator",
-            "bind": "{creator}",
-            "fieldLabel": "制单人",
-            "allowBlank": true,
-            "columnWidth": 0.25 
-        }, {
-            "xtype": "textfield",
-            "name": "field1",
-            "bind": "{field1}",
-            "fieldLabel": "field1",
-            "allowBlank": true,
-            "columnWidth": 1 
-        }, {
-            "xtype": "textfield",
-            "name": "field2",
-            "bind": "{field2}",
-            "fieldLabel": "field2",
-            "allowBlank": true,
-            "columnWidth": 1 
-        }]        
-    }
-}

+ 0 - 36
frontend/saas-web/resources/json/gridColumns1.json

@@ -1,36 +0,0 @@
-[{
-    "text": "Name",
-    "flex": 1,
-    "dataIndex": "name",
-    "width": 100,
-    "xtype": "",
-    "items": null
-}, {
-    "text": "Email",
-    "flex": 0,
-    "dataIndex": "name",
-    "width": 100,
-    "xtype": "",
-    "items": null
-}, {
-    "text": "Phone",
-    "flex": 0,
-    "dataIndex": "phone",
-    "width": 100,
-    "xtype": "",
-    "items": null
-}, {
-    "text": "Actions",
-    "flex": 0,
-    "dataIndex": "",
-    "width": 50,
-    "sortable": false,
-    "xtype": "actioncolumn",
-    "items": [{
-        "iconCls": "x-fa fa-check green",
-        "handler": "onApprove"
-    }, {
-        "iconCls": "x-fa fa-check red",
-        "handler": "onDecline"
-    }]
-}]

+ 0 - 22
frontend/saas-web/resources/json/gridColumns2.json

@@ -1,22 +0,0 @@
-[{
-    "text": "Name",
-    "flex": 1,
-    "dataIndex": "name",
-    "width": 100,
-    "xtype": "",
-    "items": null
-}, {
-    "text": "Age",
-    "flex": 0,
-    "dataIndex": "age",
-    "width": 100,
-    "xtype": "",
-    "items": null
-}, {
-    "text": "Group",
-    "flex": 0,
-    "dataIndex": "group",
-    "width": 100,
-    "xtype": "",
-    "items": null
-}]

+ 0 - 17
frontend/saas-web/resources/json/gridData1.json

@@ -1,17 +0,0 @@
-[{
-    "name": "Lisa",
-    "email": "lisa@simpsons.com",
-    "phone": "555-111-1224"
-}, {
-    "name": "Bart",
-    "email": "Bart@simpsons.com",
-    "phone": "555-111-1234"
-}, {
-    "name": "Homer",
-    "email": "homer@simpsons.com",
-    "phone": "555-111-1244"
-}, {
-    "name": "Marge",
-    "email": "Marge@simpsons.com",
-    "phone": "555-111-1254"
-}]

+ 0 - 25
frontend/saas-web/resources/json/gridData2.json

@@ -1,25 +0,0 @@
-[{
-    "name": "Lisa",
-    "age": 22,
-    "group": "group1"
-}, {
-    "name": "Lucy",
-    "age": 21,
-    "group": "group1"
-}, {
-    "name": "Malora",
-    "age": 25,
-    "group": "group2"
-}, {
-    "name": "Bart",
-    "age": 25,
-    "group": "group3"
-}, {
-    "name": "Homer",
-    "age": 28,
-    "group": "group2"
-}, {
-    "name": "Marge",
-    "age": 21,
-    "group": "group2"
-}]

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

@@ -86,13 +86,13 @@
         }, {
             "id": "otherIn",
             "text": "其它入库单",
-            "addType": "stock-otherin-formpanel",
-            "viewType": "stock-otherin-querypanel"
+            "addType": "stock-otherIn-formpanel",
+            "viewType": "stock-otherIn-querypanel"
         }, {
             "id": "otherOut",
             "text": "其它出库单",
-            "addType": "stock-otherout-formpanel",
-            "viewType": "stock-otherout-querypanel"
+            "addType": "stock-otherOut-formpanel",
+            "viewType": "stock-otherOut-querypanel"
         }, {
             "id": "inventory",
             "text": "盘点单",

+ 0 - 44
frontend/saas-web/resources/json/purchase/formItems.json

@@ -1,44 +0,0 @@
-{
-    "success": true,
-    "code": 0,
-    "message": null,
-    "data": {
-        "xtype": "formpanel",
-        "items": [{
-            "xtype": "textfield",
-            "name": "pu_code",
-            "bind": "{pu_code}",
-            "fieldLabel": "采购单号",
-            "allowBlank": true,
-            "columnWidth": 0.25
-        }, {
-            "xtype": "textfield",
-            "name": "pu_kind",
-            "bind": "{pu_kind}",
-            "fieldLabel": "采购类型",
-            "allowBlank": true,
-            "columnWidth": 0.25
-        }, {
-            "xtype": "dbfindtrigger",
-            "configUrl":"resources/json/purchase/vendorColumnsDbfind.json",
-            "dataUrl":"resources/json/purchase/vendorDataDbfind.json",
-            
-            "name": "pu_vendorcode",
-            "bind": "{pu_vendorcode}",
-            "fieldLabel": "供应商编号",
-            "allowBlank": true,
-            "columnWidth": 0.25
-        }, {
-            "xtype": "textfield",
-            "name": "pu_vendorname",
-            "bind": "{pu_vendorname}",
-            "fieldLabel": "供应商简称",
-            "allowBlank": true,
-            "columnWidth": 0.25
-        }, {
-            "xtype": "purchase-panel-GridPanel",
-            "allowBlank": true,
-            "columnWidth":1
-        }]
-    }
-}

+ 0 - 21
frontend/saas-web/resources/json/purchase/vendorColumnsDbfind.json

@@ -1,21 +0,0 @@
-[{
-    "text": "供应商编号",
-    "flex": 1,
-    "dataIndex": "pu_vendorcode",
-    "width": 100,
-    "xtype": "",
-    "items": null
-}, {
-    "text": "供应商名称",
-    "flex": 1,
-    "dataIndex": "pu_vendorname",
-    "xtype": "",
-    "items": null
-}, {
-    "text": "业务员",
-    "flex": 0,
-    "dataIndex": "saller",
-    "width": 200,
-    "xtype": "",
-    "items": null
-}]

+ 0 - 17
frontend/saas-web/resources/json/purchase/vendorDataDbfind.json

@@ -1,17 +0,0 @@
-[{
-    "pu_vendorcode": "TEST0000001",
-    "pu_vendorname": "测试供应商0000001",
-    "saller": "小李"
-}, {
-    "pu_vendorcode": "TEST0000002",
-    "pu_vendorname": "测试供应商0000002",
-    "saller": "小王"
-}, {
-    "pu_vendorcode": "TEST0000003",
-    "pu_vendorname": "测试供应商0000003",
-    "saller": "小明"
-}, {
-    "pu_vendorcode": "TEST0000004",
-    "pu_vendorname": "测试供应商0000004",
-    "saller": "小黄"
-}]

+ 0 - 7
frontend/saas-web/resources/json/vendor.json

@@ -1,7 +0,0 @@
-[{
-  "vk_id":1,
-  "vk_kind":"供应商类型1"
-},{
-  "vk_id":2,
-  "vk_kind":"供应商类型2"
-}]