Browse Source

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

hy 7 years ago
parent
commit
6f35505298
27 changed files with 892 additions and 65 deletions
  1. 4 1
      README.md
  2. 2 16
      applications/document/document-server/pom.xml
  3. 6 0
      applications/document/document-server/src/main/docker/Dockerfile
  4. 14 0
      applications/document/document-server/src/main/resources/application.yml
  5. 0 15
      applications/document/document-server/src/main/resources/banner.txt
  6. 0 2
      applications/document/document-server/src/test/java/com/usoftchina/saas/document/service/VendorTest.java
  7. 1 2
      applications/purchase/purchase-dto/pom.xml
  8. 0 1
      applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseListDTO.java
  9. 0 3
      applications/purchase/purchase-server/pom.xml
  10. 2 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java
  11. 1 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/PurchaseService.java
  12. 5 3
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  13. 14 0
      applications/purchase/purchase-server/src/main/resources/application.yml
  14. 6 3
      base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/error/MyExceptionHandler.java
  15. 1 1
      framework/server-starter/src/main/java/com/usoftchina/saas/server/error/GlobalExceptionHandler.java
  16. 10 1
      frontend/saas-web/app/util/QueryUtil.js
  17. 100 0
      frontend/saas-web/app/view/core/form/MultiCombo.js
  18. 12 2
      frontend/saas-web/app/view/main/MainModel.js
  19. 4 11
      frontend/saas-web/app/view/purchase/purchase/QueryPanel.js
  20. 137 0
      frontend/saas-web/app/view/purchase/purchaseIn/FormController.js
  21. 7 0
      frontend/saas-web/app/view/purchase/purchaseIn/FormModel.js
  22. 274 0
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  23. 256 0
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanel.js
  24. 5 0
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelController.js
  25. 9 0
      frontend/saas-web/app/view/purchase/purchaseIn/QueryPanelModel.js
  26. 11 1
      pom.xml
  27. 11 0
      script/docker-base.yaml

+ 4 - 1
README.md

@@ -4,8 +4,11 @@
 ├─saas-platform
 │  │  
 │  ├─applications-----------------------------业务应用
-│  |  ├─common-dto----------------------------基础传输对象
+│  |  ├─commons-------------------------------业务通用
 │  |  ├─document------------------------------基础资料
+│  |  |  |─document-api-----------------------基础资料api
+│  |  |  |─document-dto-----------------------基础资料数据传输对象
+│  |  |  |─document-server--------------------基础资料服务
 │  |  ├─money---------------------------------资金
 │  |  ├─purchase------------------------------采购
 │  |  |  |─purchase-api-----------------------采购服务api

+ 2 - 16
applications/document/document-server/pom.xml

@@ -13,21 +13,13 @@
     <description>document server</description>
 
     <dependencies>
-        <dependency>
-            <groupId>com.usoftchina.saas</groupId>
-            <artifactId>core</artifactId>
-        </dependency>
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>auth-client</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-actuator</artifactId>
+            <groupId>com.usoftchina.saas</groupId>
+            <artifactId>server-starter</artifactId>
         </dependency>
         <!-- db -->
         <dependency>
@@ -64,16 +56,10 @@
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>document-dto</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>com.usoftchina.saas</groupId>
-            <artifactId>common-dto</artifactId>
         </dependency>
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>commons</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
 

+ 6 - 0
applications/document/document-server/src/main/docker/Dockerfile

@@ -0,0 +1,6 @@
+FROM frolvlad/alpine-oraclejdk8:slim
+VOLUME /tmp
+ADD document-server-1.0.0-SNAPSHOT.jar app.jar
+RUN sh -c 'touch /app.jar'
+ENV JAVA_OPTS=""
+ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]

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

@@ -18,6 +18,20 @@ spring:
       connection-timeout: 30000
   messages:
     basename: i18n/messages
+  rabbitmq:
+    host: 192.168.0.176
+    port: 5672
+    password: guest
+    username: guest
+  zipkin:
+    sender:
+      type: rabbit
+    locator:
+      discovery:
+        enabled: true
+  sleuth:
+    sampler:
+      probability: 1.0
 eureka:
   instance:
     leaseRenewalIntervalInSeconds: 10

+ 0 - 15
applications/document/document-server/src/main/resources/banner.txt

@@ -1,15 +0,0 @@
-${AnsiColor.BRIGHT_YELLOW}
-
-88        88   ad88888ba     ,ad8888ba,    88888888888  888888888888  ,ad8888ba,   88        88  88  888b      88         db
-88        88  d8"     "8b   d8"'    `"8b   88                88      d8"'    `"8b  88        88  88  8888b     88        d88b
-88        88  Y8,          d8'        `8b  88                88     d8'            88        88  88  88 `8b    88       d8'`8b
-88        88  `Y8aaaaa,    88          88  88aaaaa           88     88             88aaaaaaaa88  88  88  `8b   88      d8'  `8b
-88        88    `"""""8b,  88          88  88"""""           88     88             88""""""""88  88  88   `8b  88     d8YaaaaY8b
-88        88          `8b  Y8,        ,8P  88                88     Y8,            88        88  88  88    `8b 88    d8""""""""8b
-Y8a.    .a8P  Y8a     a8P   Y8a.    .a8P   88                88      Y8a.    .a8P  88        88  88  88     `8888   d8'        `8b
- `"Y8888Y"'    "Y88888P"     `"Y8888Y"'    88                88       `"Y8888Y"'   88        88  88  88      `888  d8'          `8b
-
-
-Application Version: ${application.version}${application.formatted-version}
-Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
-${AnsiColor.DEFAULT}

+ 0 - 2
applications/document/document-server/src/test/java/com/usoftchina/saas/document/service/VendorTest.java

@@ -3,8 +3,6 @@ package com.usoftchina.saas.document.service;
 
 import com.usoftchina.saas.document.DocumentApplication;
 import com.usoftchina.saas.document.dto.VendorDTO;
-import com.usoftchina.saas.document.po.Vendor;
-import com.usoftchina.saas.page.PageRequest;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;

+ 1 - 2
applications/purchase/purchase-dto/pom.xml

@@ -15,7 +15,7 @@
     <dependencies>
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
-            <artifactId>common-dto</artifactId>
+            <artifactId>commons</artifactId>
         </dependency>
         <dependency>
             <groupId>io.springfox</groupId>
@@ -29,7 +29,6 @@
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>document-dto</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
 </project>

+ 0 - 1
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/PurchaseListDTO.java

@@ -3,7 +3,6 @@ package com.usoftchina.saas.purchase.dto;
 import lombok.Data;
 
 import java.io.Serializable;
-import java.math.BigDecimal;
 import java.util.Date;
 
 /**

+ 0 - 3
applications/purchase/purchase-server/pom.xml

@@ -20,7 +20,6 @@
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>document-api</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
@@ -51,7 +50,6 @@
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
-            <version>1.16.10</version>
         </dependency>
         <dependency>
             <groupId>com.github.pagehelper</groupId>
@@ -65,7 +63,6 @@
         <dependency>
             <groupId>com.usoftchina.saas</groupId>
             <artifactId>commons</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
         </dependency>
     </dependencies>
 

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

@@ -94,8 +94,8 @@ public class PurchaseController {
      */
     @PostMapping("/audit")
     public Result audit(@RequestBody PurchaseFormDTO formData) {
-        Long id = purchaseService.audit(formData);
-        return Result.success(id);
+        DocSavedDTO audit = purchaseService.audit(formData);
+        return Result.success(audit);
     }
 
     /**

+ 1 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/PurchaseService.java

@@ -71,7 +71,7 @@ public interface PurchaseService extends CommonBaseService<PurchaseMapper, Purch
      * @param formData
      * @return
      */
-    Long audit(PurchaseFormDTO formData);
+    DocSavedDTO audit(PurchaseFormDTO formData);
 
     /**
     * @Description 批量审核

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

@@ -102,7 +102,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         //判断更新与保存动作
         if (!StringUtils.isEmpty(pu_id)) {
             //更新主表
-            purchaseMapper.updateByPrimaryKey(purchase);
+            purchaseMapper.updateByPrimaryKeySelective(purchase);
             //添加从表传输对象
             for (PurchaseItemDTO item : items) {
                 PurchaseItem detail = BeanMapper.map(item, PurchaseItem.class);
@@ -155,8 +155,9 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     }
 
     @Override
-    public Long audit(PurchaseFormDTO formData) {
+    public DocSavedDTO audit(PurchaseFormDTO formData) {
         Long id = null;
+        DocSavedDTO savedDTO = new DocSavedDTO();
         if (null != formData) {
             id = formData.getMain().getId();
             if (StringUtils.isEmpty(id)) {
@@ -165,7 +166,8 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             }
             singleAudit(id);
         }
-        return id;
+        savedDTO.setId(id);
+        return savedDTO;
     }
 
     @Override

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

@@ -18,6 +18,20 @@ spring:
       connection-timeout: 30000
   messages:
     basename: i18n/messages
+  rabbitmq:
+    host: 192.168.0.176
+    port: 5672
+    password: guest
+    username: guest
+  zipkin:
+    sender:
+      type: rabbit
+    locator:
+      discovery:
+        enabled: true
+  sleuth:
+    sampler:
+      probability: 1.0
 eureka:
   instance:
     leaseRenewalIntervalInSeconds: 10

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

@@ -76,14 +76,17 @@ public class MyExceptionHandler extends DefaultErrorWebExceptionHandler {
     }
 
     /**
-     * 根据code获取对应的HttpStatus
+     * 获取HttpStatus
      *
      * @param errorAttributes
      */
     @Override
     protected HttpStatus getHttpStatus(Map<String, Object> errorAttributes) {
-        int statusCode = (int) errorAttributes.get("code");
-        return HttpStatus.valueOf(statusCode);
+//        // 根据code获取对应的HttpStatus
+//        int statusCode = (int) errorAttributes.get("code");
+//        return HttpStatus.valueOf(statusCode);
+        // 统一返回http status: 200
+        return HttpStatus.OK;
     }
 
     /**

+ 1 - 1
framework/server-starter/src/main/java/com/usoftchina/saas/server/error/GlobalExceptionHandler.java

@@ -32,7 +32,7 @@ public class GlobalExceptionHandler {
     public Result defaultHandler(HttpServletRequest request, Exception e) throws Exception{
         String error = ServletErrorUtils.buildMessage(request, e);
         logger.error(error, e);
-        return Result.error(500, error);
+        return Result.throwable(e);
     }
 
     /**

+ 10 - 1
frontend/saas-web/app/util/QueryUtil.js

@@ -104,7 +104,16 @@ Ext.define('saas.util.QueryUtil', {
 						});
 						condition += _a + ')';
 					}
-				}  else {
+				} else if(f.xtype == 'multicombo' ){
+				    if(f.value){
+                        if(condition == ''){
+                            condition += f.name + " in (" + f.value+")";
+                        } else {
+                            condition += ' AND ' +  f.name + " in (" + f.value+")";
+                        }
+                    }
+
+                } else {
                     if(!Ext.isEmpty(f.value)){
                         if(me.contains(f.value.toString(), 'BETWEEN', true) && me.contains(f.value.toString(), 'AND', true)){
                             if(condition == ''){

+ 100 - 0
frontend/saas-web/app/view/core/form/MultiCombo.js

@@ -0,0 +1,100 @@
+/**
+ * Created by zhouy on 2018/10/17.
+ */
+Ext.define('saas.view.core.form.MultiCombo', {
+    extend: 'Ext.form.field.Trigger',
+    alias: 'widget.multicombo',
+    editable : false,
+    displayField:'display',
+    valueField:'value',
+    matchFieldWidth: true,
+    cachedConfig: {
+        menuAlign: 'tl-bl?',
+        destroyMenu: true
+    },
+    initComponent: function() {
+        var me = this;
+        me.callParent(arguments);
+    },
+    onTriggerClick:function(f){
+        this.showMenu();
+    },
+    getMenu: function() {
+        var me = this;
+
+        if (!me.menu) {
+
+            me.menu = Ext.create('Ext.menu.Menu',{
+                hideOnParentHide: false,
+                items: me.getMenuItems()
+                //listners
+            });
+            me.fireEvent('menucreate', me, me.menu);
+        }
+        return me.menu;
+    },
+    getMenuItems:function(){
+        var me = this,
+            i = 0,
+            item,
+            items = me.datas;
+        itemsLn = me.datas.length,
+            menuItems = [];
+        for (; i < itemsLn; i++) {
+            item = items[i];
+            menuItem = new Ext.menu.CheckItem({
+                text: item[1],
+                checked: item.checked,
+                checkValue:item[0],
+                hideOnClick: false,
+                checkHandler: this.onCheckChange,
+                scope: this
+            });
+            menuItems.push(menuItem);
+        }
+        return menuItems.length ? menuItems : null;
+    },
+    onCheckChange:function(checkItem, checked){
+        var items=this.menu.items.items,
+            rawV,v;
+        Ext.Array.each(items,function(item){
+            if(item.checked){
+                rawV=rawV?rawV+','+item.text:item.text;
+                v=v?v+","+"'"+item.checkValue+"'":"'"+item.checkValue+"'";
+            }
+        });
+        this.setRawValue(rawV);
+        this.value=v;
+    },
+
+    showMenu: function (e, menu) {
+        var isPointerEvent = !e || e.pointerType;
+
+        menu = menu || this.getMenu();
+        /**
+         * menu上边框样式待处理
+         * */
+        if (menu) {
+            if (menu.isVisible()) {
+                // Click/tap toggles the menu visibility.
+                if (isPointerEvent) {
+                    menu.hide();
+                } else {
+                    menu.focus();
+                }
+            } else {
+                menu.autoFocus = !isPointerEvent;
+                if(this.matchFieldWidth){
+                    menu.setWidth(this.bodyEl.getWidth());
+                }
+                if (menu.isMenu) {
+                    menu.showBy(this.inputEl, this.getMenuAlign(),[-1, 0]);
+                } else if (menu.isViewportMenu) {
+                    menu.setDisplayed(!menu.getDisplayed());
+                } else {
+                    menu.show();
+                }
+            }
+        }
+    }
+});

+ 12 - 2
frontend/saas-web/app/view/main/MainModel.js

@@ -32,10 +32,20 @@ Ext.define('saas.view.main.MainModel', {
                                         viewType:'purchase-purchase-formpanel',
                                         leaf: true
                                     },{
-                                        id: 'purchaseList',
-                                        text: '采购单列表',
+                                        id: 'purchaseQuery',
+                                        text: '采购单查询',
                                         viewType:'purchase-purchase-querypanel',
                                         leaf: true
+                                    },{
+                                        id: 'purchaseInOrder',
+                                        text: '采购验收单(维护界面)',
+                                        viewType:'purchase-purchaseIn-formpanel',
+                                        leaf: true
+                                    },{
+                                        id: 'purchaseInQuery',
+                                        text: '采购验收单查询',
+                                        viewType:'purchase-purchaseIn-querypanel',
+                                        leaf: true
                                     },{
                                         id: 'list1',
                                         text: '列表界面1',

+ 4 - 11
frontend/saas-web/app/view/purchase/purchase/QueryPanel.js

@@ -108,7 +108,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         queryMode: 'local',
             displayField: 'pr_status',
             valueField: 'pr_statuscode',
-        store: Ext.create('Ext.data.ArrayStore', {
+            store: Ext.create('Ext.data.ArrayStore', {
             fields: ['pr_statuscode', 'pr_status'],
             data: [
                 ["$ALL", "全部"],
@@ -117,24 +117,17 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
             ]
         })
     }, {
-        xtype: 'combobox',
+        xtype: 'multicombo',
         name: 'pu_acceptstatuscode',
-        bind: '{pu_acceptstatuscode}',
+       // bind: '{pu_acceptstatuscode}',
         fieldLabel: '入库状态',
         allowBlank: true,
         columnWidth: 0.25,
-        queryMode: 'local',
-        displayField: 'pu_acceptstatus',
-        valueField: 'pu_acceptstatuscode',
-        store: Ext.create('Ext.data.ArrayStore', {
-            fields: ['pu_acceptstatuscode', 'pu_acceptstatus'],
-            data: [
-                ["$ALL", "全部"],
+        datas: [
                 ["TURNOUT", "已入库"],
                 ["NOOUT", "未入库"],
                 ["PARTOUT", "部分入库"]
             ]
-        })
     }],
     moreQueryFormItems: [{
         xtype: 'textfield',

+ 137 - 0
frontend/saas-web/app/view/purchase/purchaseIn/FormController.js

@@ -0,0 +1,137 @@
+Ext.define('saas.view.purchase.purchaseIn.FormController', {
+    extend: 'saas.view.core.form.FormPanelController',
+    alias: 'controller.purchase-purchaseIn-formcontroller',
+    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();
+
+    }
+});

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

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

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

@@ -0,0 +1,274 @@
+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',
+    
+    _title:'采购验收单',
+    _codeField: 'pi_inoutno',
+    _statusField: 'pi_statuscode',
+    _idField: 'id',
+    _detnoColumn:  'pd_pdno',
+    _dataModelUrl:'http://192.168.253.58:8800/purchase/read/',
+    _saveUrl:'http://192.168.253.58:8800/purchase/save',
+    _auditUrl:'http://192.168.253.58:8800/purchase/audit',
+    _deleteUrl:'http://192.168.253.58:8800/purchase/delete/',
+    _deleteDetailUrl:'http://192.168.253.58:8800/purchase/deleteItem/',
+    initId:0,
+
+    toolBtns: [{
+        xtype: 'button',
+        text: '转单按钮',
+        handler: function() {
+            console.log('11');
+        }
+    }],
+
+    defaultItems: [{
+        xtype: 'hidden',
+        name: 'id',
+        bind: '{id}',
+        fieldLabel: 'id',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype : "textfield", 
+        name : "pi_inoutno", 
+        bind : "{pi_inoutno}", 
+        fieldLabel : "验收单号", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    },{
+        xtype : "textfield", 
+        name : "pi_class", 
+        bind : "{pi_class}", 
+        fieldLabel : "类型", 
+        readOnly:true,
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        name : "pu_vendid", 
+        bind : "{pu_vendid}", 
+        fieldLabel : "供应商ID", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }, {
+        xtype : "textfield", 
+        name : "pu_vendcode", 
+        bind : "{pu_vendcode}", 
+        fieldLabel : "供应商编号", 
+        hidden:true,
+        allowBlank : true, 
+        columnWidth : 0, 
+    }, {
+        xtype : "dbfindtrigger", 
+        name : "pu_vendname", 
+        bind : "{pu_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 : "交货地址", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "textfield", 
+        name : "pu_total", 
+        bind : "{pu_total}", 
+        fieldLabel : "单据金额", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        name : "detailGridField", 
+        xtype : "detailGridField", 
+        bind: {
+            store:{
+                data:'{detailGridField}'
+            }
+        },
+        columns : [
+            {
+                text : "序号", 
+                dataIndex : "pd_pdno", 
+                width : 80.0, 
+                xtype : "rownumberer"
+            }, {
+                text : "id", 
+                dataIndex : "id", 
+                xtype : "numbercolumn"
+            },
+            {
+                editor : {
+                    displayField : "display", 
+                    editable : true, 
+                    format : "", 
+                    hideTrigger : false, 
+                    maxLength : 100.0, 
+                    minValue : null, 
+                    positiveNum : false, 
+                    queryMode : "local", 
+                    store : null, 
+                    valueField : "value", 
+                    xtype : "dbfindtrigger"
+                }, 
+                text : "物料编号", 
+                width : 200.0, 
+                dataIndex : "pd_prodcode", 
+                xtype : "", 
+                items : null
+            },
+            {
+                text : "单位", 
+                editor : {
+                    xtype : "textfield"
+                }, 
+                dataIndex : "pd_unit", 
+                width : 120.0, 
+                xtype : "", 
+                items : null
+            }, 
+            {
+                text : "数量", 
+                dataIndex : "pd_inqty", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            }, 
+            {
+                text : "仓库", 
+                dataIndex : "pd_whname", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                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 : "pd_orderprice", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            }, 
+           {
+                text : "含税金额", 
+                dataIndex : "pd_total", 
+                width : 120.0, 
+                xtype : "numbercolumn"
+            }, {
+                text : "税率", 
+                dataIndex : "pd_taxrate", 
+                width : 120.0, 
+                xtype : "numbercolumn", 
+                items : null
+            },
+            {
+                text : "未税金额", 
+                dataIndex : "pd_nettotal", 
+                xtype : "numbercolumn"
+            },
+            {
+                text : "采购单号", 
+                dataIndex : "pd_ordercode", 
+                width : 120.0,
+                flex : 1.0,
+                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 : "pd_orderdetno", 
+                xtype : "numbercolumn",
+                flex:1
+            }
+        ]
+    }, {
+        format : "Y-m-d", 
+        xtype : "datetimefield", 
+        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 : "puStatus", 
+        bind : "{puStatus}", 
+        fieldLabel : "单据状态", 
+        allowBlank : true, 
+        columnWidth : 0.25
+    }, {
+        xtype : "hidden", 
+        readOnly : true, 
+        editable : false, 
+        name : "pu_statuscode", 
+        bind : "{pu_statuscode}", 
+        fieldLabel : "单据状态码", 
+        allowBlank : true, 
+        columnWidth : 0.0
+    }]
+});

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

@@ -0,0 +1,256 @@
+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',
+    _baseVastUrl:'http://192.168.253.58:8800/purchase/',
+    _idField:'pi_id',
+    _codeField:'pi_inoutno',
+    queryFormItems: [{
+        xtype: 'hidden',
+        name: 'pi_id',
+        bind: '{pi_id}',
+        fieldLabel: 'ID',
+        allowBlank: true,
+        columnWidth: 0
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pi_inoutno',
+        bind: '{pi_inoutno}',
+        fieldLabel: '单据编号',
+        allowBlank: true,
+        columnWidth: 0.25,
+        dataUrl:'http://192.168.253.41:9480/api/document/vendor/getVendorsByCondition',
+        dbfinds:[{
+            from:'ve_code',to:'pu_code'
+        }],
+        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
+        }]
+    }, {
+        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,
+        configUrl: 'resources/json/purchase/vendorColumnsDbfind.json',
+        dataUrl: 'resources/json/purchase/vendorDataDbfind.json'
+    }, {
+        xtype: 'textfield',
+        name: 'pu_vendname',
+        bind: '{pu_vendname}',
+        fieldLabel: '供应商名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'dbfindtrigger',
+        name: 'pd_prodcode#pd_prodcode',
+        bind: '{pd_prodcode}',
+        fieldLabel: '物料编号',
+        fieldMode: 'DETAIL',
+        queryType:'VAG',
+        allowBlank: true,
+        columnWidth: 0.25,
+        configUrl: 'resources/json/purchase/vendorColumnsDbfind.json',
+        dataUrl: 'resources/json/purchase/vendorDataDbfind.json'
+    }, {
+        xtype: 'textfield',
+        name: 'pr_detail',
+        bind: '{pr_detail}',
+        fieldLabel: '物料名称',
+        allowBlank: true,
+        columnWidth: 0.25
+    }, {
+        xtype: 'combobox',
+        name: 'pr_statuscode',
+       // bind: '{pr_statuscode}',
+        fieldLabel: '审核状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        queryMode: 'local',
+            displayField: 'pr_status',
+            valueField: 'pr_statuscode',
+        store: Ext.create('Ext.data.ArrayStore', {
+            fields: ['pr_statuscode', 'pr_status'],
+            data: [
+                ["$ALL", "全部"],
+                ["AUDITED", "已审核"],
+                ["UNAUDITED", "未审核"]
+            ]
+        })
+    }, {
+        xtype: 'combobox',
+        name: 'pu_acceptstatuscode',
+        bind: '{pu_acceptstatuscode}',
+        fieldLabel: '入库状态',
+        allowBlank: true,
+        columnWidth: 0.25,
+        queryMode: 'local',
+        displayField: 'pu_acceptstatus',
+        valueField: 'pu_acceptstatuscode',
+        store: Ext.create('Ext.data.ArrayStore', {
+            fields: ['pu_acceptstatuscode', 'pu_acceptstatus'],
+            data: [
+                ["$ALL", "全部"],
+                ["TURNOUT", "已入库"],
+                ["NOOUT", "未入库"],
+                ["PARTOUT", "部分入库"]
+            ]
+        })
+    }],
+    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',
+        _title:'采购单',
+        _addXtype:'test-order-formpanel',
+        _baseVastUrl:'http://192.168.253.58: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
+        }]
+    }
+});

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

@@ -0,0 +1,5 @@
+Ext.define('saas.view.purchase.purchaseIn.QueryPanelController', {
+    extend: 'saas.view.core.query.QueryPanelController',
+    alias: 'controller.purchase-purchaseIn-queryformcontroller',
+
+});

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

@@ -0,0 +1,9 @@
+Ext.define('saas.view.purchase.purchaseIn.QueryPanelModel', {
+    extend: 'saas.view.core.query.QueryPanelModel',
+    alias: 'viewmodel.purchase-purchaseIn-queryformmodel',
+
+    data: {
+       // pu_total: '3333',
+        //pu_code: '4'
+    }
+});

+ 11 - 1
pom.xml

@@ -247,7 +247,7 @@
             </dependency>
             <dependency>
                 <groupId>com.usoftchina.saas</groupId>
-                <artifactId>common-dto</artifactId>
+                <artifactId>commons</artifactId>
                 <version>${project.release.version}</version>
             </dependency>
             <dependency>
@@ -260,6 +260,16 @@
                 <artifactId>purchase-dto</artifactId>
                 <version>${project.release.version}</version>
             </dependency>
+            <dependency>
+                <groupId>com.usoftchina.saas</groupId>
+                <artifactId>document-api</artifactId>
+                <version>${project.release.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.usoftchina.saas</groupId>
+                <artifactId>document-dto</artifactId>
+                <version>${project.release.version}</version>
+            </dependency>
             <!-- file upload -->
             <dependency>
                 <groupId>io.github.openfeign.form</groupId>

+ 11 - 0
script/docker-base.yaml

@@ -38,6 +38,17 @@ services:
 #    networks:
 #      - saas
 
+# Elasticsearch, Logstash, Kibana
+  elk:
+    image: sebp/elk
+    container_name: elk
+    ports:
+      - "5601:5601"
+      - "9200:9200"
+      - "5044:5044"
+    networks:
+      - saas
+
 networks:
   saas:
     driver: bridge