Explorar o código

修改采购模块

zhoudw %!s(int64=7) %!d(string=hai) anos
pai
achega
91920feb88

+ 8 - 1
applications/document/document-dto/src/main/java/com.usoftchina.saas.document.dto/ProductDTO.java

@@ -1,6 +1,5 @@
 package com.usoftchina.saas.document.dto;
 
-import com.usoftchina.saas.base.dto.CommonBaseDTO;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -36,5 +35,13 @@ public class ProductDTO implements Serializable {
     private String pr_text2;
     private String pr_text3;
     private String pr_text4;
+    protected Date createTime;
+    protected String creatorName;
+    protected Date updateTime;
+    protected String updaterName;
+    //productonhand
+    private Long po_onhand;
+
+
 
 }

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/ProductController.java

@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.*;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
+@CrossOrigin
 @RestController
 @RequestMapping("/product")
 public class ProductController {

+ 1 - 3
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/ProductMapper.java

@@ -1,9 +1,7 @@
 package com.usoftchina.saas.document.mapper;
 
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
-
 import com.usoftchina.saas.commons.dto.ComboDTO;
-import com.usoftchina.saas.commons.dto.DocReqDTO;
 import com.usoftchina.saas.document.dto.ProductDTO;
 import com.usoftchina.saas.document.entities.Product;
 import org.apache.ibatis.annotations.Param;
@@ -12,7 +10,7 @@ import java.util.List;
 
 public interface ProductMapper extends CommonBaseMapper<Product> {
 
-    List<ProductDTO> getProductsByCondition(@Param("condition") String condition, @Param("companyId") Long companyId);
+    List<ProductDTO> getProductsByCondition(@Param("con") String con, @Param("companyId") Long companyId);
 
     List<ComboDTO> getProdUnit();
 

+ 20 - 4
applications/document/document-server/src/main/resources/mapper/ProductMapper.xml

@@ -41,17 +41,32 @@
         <result column="pr_detail" property="pr_detail" jdbcType="VARCHAR" />
         <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR" />
         <result column="pr_unit" property="pr_unit" jdbcType="VARCHAR" />
+        <result column="pr_whid" property="pr_whid" jdbcType="INTEGER" />
+        <result column="pr_whcode" property="pr_whcode" jdbcType="VARCHAR" />
+        <result column="pr_whname" property="pr_whname" jdbcType="VARCHAR" />
+        <!--productonhand-->
+        <result column="po_onhand" property="po_onhand" jdbcType="INTEGER" />
+        <!--productonhand-->
+        <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR" />
         <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
-        <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR" />
+        <result column=" pr_brand" property="pr_brand" jdbcType="VARCHAR" />
+        <result column=" pr_vendname" property="pr_vendname" jdbcType="VARCHAR" />
+        <result column=" pr_zxbzs" property="pr_zxbzs" jdbcType="VARCHAR" />
+        <result column=" pr_leadtime" property="pr_leadtime" jdbcType="INTEGER" />
         <result column="pr_status" property="pr_status" jdbcType="VARCHAR" />
         <result column="pr_statuscode" property="pr_statuscode" jdbcType="VARCHAR" />
     </resultMap>
+
+
     <!--查询所有物料信息-->
     <select id="getProductsByCondition" resultMap="ProductDTOResultMapper" parameterType="com.usoftchina.saas.commons.dto.DocReqDTO">
-        SELECT * FROM PRODUCT
+        SELECT * FROM PRODUCT left join productonhand on pr_id = po_prodid
         <where>
-            <if test="condition!=null">
-                ${condition}
+            <if test="con != null">
+                ${con}
+            </if>
+            <if test="companyId != null">
+                and  PRODUCT.companyid = #{companyId}
             </if>
         </where>
     </select>
@@ -450,5 +465,6 @@
         pr_text5 = #{pr_text5,jdbcType=VARCHAR}
         where pr_id = #{id}
     </update>
+
 </mapper>
 

+ 96 - 13
frontend/saas-web/app/view/purchase/purchase/FormPanelController.js

@@ -29,10 +29,14 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         dbtplfield:"ve_name",
                         //放大镜窗口字段
                         dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
                             name : "ve_name", 
-                            fieldLabel : "供应商名称", 
-                            columnWidth : 0.25
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "ve_name like '%" + v + "%' or ve_code like '%"+ v +"%'";
+                            }
                         }],
                         //放大镜窗口列表
                         dbColumns:[{
@@ -52,6 +56,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         }, {
                             "text": "供应商名称",
                             "flex": 1,
+                            "width": 100,
                             "dataIndex": "ve_name",
                             "xtype": "",
                             "items": null
@@ -59,21 +64,21 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                             "text": "供应商类型",
                             "flex": 0,
                             "dataIndex": "ve_type",
-                            "width": 50,
+                            "width": 80,
                             "xtype": "",
                             "items": null
                         },{
                             "text": "税率",
                             "flex": 0,
                             "dataIndex": "ve_taxrate",
-                            "width": 50,
+                            "width": 80,
                             "xtype": "",
                             "items": null
                         },{
                             "text": "承付天数",
                             "flex": 0,
                             "dataIndex": "ve_promisedays",
-                            "width": 50,
+                            "width": 80,
                             "xtype": "",
                             "items": null
                         },{
@@ -116,6 +121,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                     Ext.apply(f,{
                         //数据接口
                         // dataUrl:'http://192.168.253.31:9480/product/getProductsByCondition',
+                        // dataUrl:'http://localhost:9480/product/list',
                         dataUrl: '/api/document/product/list',
                         defaultCondition:"pr_statuscode='OPEN'",
                         //放大镜赋值设置
@@ -141,36 +147,113 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                             emptyText:'输入物料编号或物料名称',
                             xtype : "textfield", 
                             name : "search", 
-                            conditionExpression:"CONCAT(pr_code, pr_detail) like '{0}%'",
                             allowBlank : true, 
-                            columnWidth : 0.25
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "pr_code like '%" + v + "%' or pr_detail like '%"+ v +"%'";
+                            }
                         }],
                         //窗口列设置
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
                             "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
                             "items": null
                         },{
-                            "text": "物料编号",
-                            "flex": 1,
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
                             "width": 100,
                             "xtype": "",
                             "items": null
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 100,
                             "dataIndex": "pr_detail",
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料规格",
+                            "text": "规格",
                             "flex": 0,
                             "dataIndex": "pr_spec",
-                            "width": 200,
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }, {
+                            "text": "单位",
+                            "flex": 0,
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库id",
+                            "flex": 0,
+                            "dataIndex": "pr_whid",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库编号",
+                            "flex": 0,
+                            "dataIndex": "pr_whcode",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库",
+                            "flex": 0,
+                            "dataIndex": "pr_whname",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "总库存数",
+                            "flex": 0,
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "类型",
+                            "flex": 0,
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "型号",
+                            "flex": 0,
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "品牌",
+                            "flex": 0,
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "供应商",
+                            "flex": 0,
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "最小包装",
+                            "flex": 0,
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "L/T",
+                            "flex": 0,
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
                             "xtype": "",
                             "items": null
                         }]

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

@@ -27,6 +27,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     // _readUrl:'http://localhost:8800/prodinout/read/',
     // _saveUrl:'http://localhost:8800/prodinout/save',
     // _auditUrl:'http://localhost:8800/prodinout/audit',
+    // _unAuditUrl:'http://localhost:8800/prodinout/unAudit/',
     // _deleteUrl:'http://localhost:8800/prodinout/delete/',
     // _turnOutUrl:'http://localhost:8800/prodinout/turnProdOut/',
 

+ 114 - 13
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js

@@ -20,6 +20,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         // dataUrl:'http://localhost:9480/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
+                        defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
                             from:'ve_id',to:'pi_vendid'
                         },{
@@ -36,11 +37,15 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         dbtplfield:"ve_name",
                         //放大镜窗口字段
                         dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
                             name : "ve_name", 
-                            fieldLabel : "供应商名称", 
-                            columnWidth : 0.25
-                        }],                        
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "ve_name like '%" + v + "%' or ve_code like '%"+ v +"%'";
+                            }
+                        }],
                         dbColumns:[{
                             conditionCode:'ve_id',
                             "text": "供应商ID",
@@ -93,6 +98,12 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                             from:'pr_detail',to:'pr_detail'
                         },{
                             from:'pr_spec',to:'pr_spec'
+                        },{
+                            from:'pr_whid',to:'pd_whid'
+                        },{
+                            from:'pr_whcode',to:'pd_whcode'
+                        },{
+                            from:'pr_whname',to:'pd_whname'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100
@@ -101,41 +112,121 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         },{
                             field:'pr_spec',width:100
                         }],
+                        //窗口字段设置
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号或物料名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "pr_code like '%" + v + "%' or pr_detail like '%"+ v +"%'";
+                            }
+                        }],
+                        //窗口列设置
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
                             "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
                             "items": null
                         },{
-                            "text": "物料编号",
-                            "flex": 1,
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
                             "width": 100,
                             "xtype": "",
                             "items": null
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 100,
                             "dataIndex": "pr_detail",
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料规格",
+                            "text": "规格",
                             "flex": 0,
                             "dataIndex": "pr_spec",
-                            "width": 200,
+                            "width": 100,
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料单位",
+                            "text": "单位",
                             "flex": 0,
-                            "dataIndex": "pr_unit",
-                            "width": 200,
+                            "dataIndex": "pr_spec",
+                            "width": 100,
                             "xtype": "",
                             "items": null
-                        }]
+                        },{
+                            "text": "仓库id",
+                            "flex": 0,
+                            "dataIndex": "pr_whid",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库编号",
+                            "flex": 0,
+                            "dataIndex": "pr_whcode",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库",
+                            "flex": 0,
+                            "dataIndex": "pr_whname",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "总库存数",
+                            "flex": 0,
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "类型",
+                            "flex": 0,
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "型号",
+                            "flex": 0,
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "品牌",
+                            "flex": 0,
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "供应商",
+                            "flex": 0,
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "最小包装",
+                            "flex": 0,
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "L/T",
+                            "flex": 0,
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        }]                    
                     }) ;   
 
                 }
@@ -162,6 +253,16 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         },{
                             field:'pd_whname',width:100
                         }],
+                        dbSearchFields:[{
+                            emptyText:'输入仓库编号或名称',
+                            xtype : "textfield", 
+                            name : "wh_code", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "wh_code like '%" + v + "%' or wh_description like '%"+ v +"%'";
+                            }
+                        }],                        
                         dbColumns:[{
                             "text": "仓库ID",
                             "flex": 0,

+ 113 - 12
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -19,6 +19,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         // dataUrl:'http://localhost:9480/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
+                        defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
                             from:'ve_id',to:'pi_vendid'
                         },{
@@ -35,10 +36,14 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         dbtplfield:"ve_name",
                         //放大镜窗口字段
                         dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
                             name : "ve_name", 
-                            fieldLabel : "供应商名称", 
-                            columnWidth : 0.25
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "ve_name like '%" + v + "%' or ve_code like '%"+ v +"%'";
+                            }
                         }],
                         dbColumns:[{
                             conditionCode:'ve_id',
@@ -92,6 +97,12 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                             from:'pr_detail',to:'pr_detail'
                         },{
                             from:'pr_unit',to:'pd_unit'
+                        },{
+                            from:'pr_whid',to:'pd_whid'
+                        },{
+                            from:'pr_whcode',to:'pd_whcode'
+                        },{
+                            from:'pr_whname',to:'pd_whname'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100
@@ -100,38 +111,118 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         },{
                             field:'pr_unit',width:100
                         }],
+                        //窗口字段设置
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号或物料名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "pr_code like '%" + v + "%' or pr_detail like '%"+ v +"%'";
+                            }
+                        }],                        
+                        //窗口列设置
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
+                            "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
                             "items": null
                         },{
-                            "text": "物料编号",
-                            "flex": 1,
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
                             "width": 100,
                             "xtype": "",
                             "items": null
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 100,
                             "dataIndex": "pr_detail",
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料规格",
+                            "text": "规格",
                             "flex": 0,
                             "dataIndex": "pr_spec",
-                            "width": 200,
+                            "width": 100,
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料单位",
+                            "text": "单位",
                             "flex": 0,
-                            "dataIndex": "pr_unit",
-                            "width": 200,
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库id",
+                            "flex": 0,
+                            "dataIndex": "pr_whid",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库编号",
+                            "flex": 0,
+                            "dataIndex": "pr_whcode",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库",
+                            "flex": 0,
+                            "dataIndex": "pr_whname",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "总库存数",
+                            "flex": 0,
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "类型",
+                            "flex": 0,
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "型号",
+                            "flex": 0,
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "品牌",
+                            "flex": 0,
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "供应商",
+                            "flex": 0,
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "最小包装",
+                            "flex": 0,
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "L/T",
+                            "flex": 0,
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
                             "xtype": "",
                             "items": null
                         }]
@@ -161,6 +252,16 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         },{
                             field:'pd_whname',width:100
                         }],
+                        dbSearchFields:[{
+                            emptyText:'输入仓库编号或名称',
+                            xtype : "textfield", 
+                            name : "wh_code", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "wh_code like '%" + v + "%' or wh_description like '%"+ v +"%'";
+                            }
+                        }],                        
                         dbColumns:[{
                             "text": "仓库ID",
                             "flex": 0,

+ 158 - 17
frontend/saas-web/app/view/stock/appropriationInOut/FormPanelController.js

@@ -19,6 +19,7 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         // dataUrl:'http://localhost:9480/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
+                        defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
                             from:'id',to:'pi_vendid'
                         },{
@@ -35,10 +36,14 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         dbtplfield:"ve_name",
                         //放大镜窗口字段
                         dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
                             name : "ve_name", 
-                            fieldLabel : "供应商名称", 
-                            columnWidth : 0.25
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "ve_name like '%" + v + "%' or ve_code like '%"+ v +"%'";
+                            }
                         }],
                         dbColumns:[{
                             conditionCode:'id',
@@ -100,13 +105,16 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         dbtplfield:"cu_name",
                         //放大镜窗口字段
                         dbSearchFields:[{
+                            emptyText:'输入客户编号或名称',
                             xtype : "textfield", 
                             name : "cu_name", 
-                            fieldLabel : "客户名称", 
-                            columnWidth : 0.25
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "cu_name like '%" + v + "%' or cu_code like '%"+ v +"%'";
+                            }
                         }],
                         dbColumns:[{
-                            conditionCode:'id',
                             "text": "客户ID",
                             "flex": 0,
                             "dataIndex": "id",
@@ -114,7 +122,6 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             "xtype": "",
                             "items": null
                         },{
-                            conditionCode:'cu_code',
                             "text": "客户编号",
                             "flex": 1,
                             "dataIndex": "cu_code",
@@ -122,12 +129,41 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             "xtype": "",
                             "items": null
                         }, {
-                            conditionCode:'cu_name',
                             "text": "客户名称",
                             "flex": 1,
                             "dataIndex": "cu_name",
                             "xtype": "",
                             "items": null
+                        },{
+                            "text": "客户类型",
+                            "flex": 1,
+                            "dataIndex": "cu_name",
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "业务员",
+                            "flex": 1,
+                            "dataIndex": "cu_sellername",
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "cu_taxrate",
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "cu_promisedays",
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "额度",
+                            "flex": 1,
+                            "dataIndex": "cu_credit",
+                            "xtype": "",
+                            "items": null
                         }]
                     }) ;   
 
@@ -149,6 +185,12 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                             from:'pr_detail',to:'pr_detail'
                         },{
                             from:'pr_spec',to:'pr_spec'
+                        },{
+                            from:'pr_whid',to:'pd_whid'
+                        },{
+                            from:'pr_whcode',to:'pd_whcode'
+                        },{
+                            from:'pr_whname',to:'pd_whname'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100
@@ -157,38 +199,117 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                         },{
                             field:'pr_spec',width:100
                         }],
+                        //窗口字段设置
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号或物料名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "pr_code like '%" + v + "%' or pr_detail like '%"+ v +"%'";
+                            }
+                        }],                         
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
+                            "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
                             "items": null
                         },{
-                            "text": "物料编号",
-                            "flex": 1,
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
                             "width": 100,
                             "xtype": "",
                             "items": null
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 100,
                             "dataIndex": "pr_detail",
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料规格",
+                            "text": "规格",
                             "flex": 0,
                             "dataIndex": "pr_spec",
-                            "width": 200,
+                            "width": 100,
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料单位",
+                            "text": "单位",
                             "flex": 0,
-                            "dataIndex": "pr_unit",
-                            "width": 200,
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库id",
+                            "flex": 0,
+                            "dataIndex": "pr_whid",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库编号",
+                            "flex": 0,
+                            "dataIndex": "pr_whcode",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库",
+                            "flex": 0,
+                            "dataIndex": "pr_whname",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "总库存数",
+                            "flex": 0,
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "类型",
+                            "flex": 0,
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "型号",
+                            "flex": 0,
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "品牌",
+                            "flex": 0,
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "供应商",
+                            "flex": 0,
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "最小包装",
+                            "flex": 0,
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "L/T",
+                            "flex": 0,
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
                             "xtype": "",
                             "items": null
                         }]
@@ -217,6 +338,16 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                     },{
                         field:'pd_whname',width:100
                     }],
+                    dbSearchFields:[{
+                        emptyText:'输入仓库编号或名称',
+                        xtype : "textfield", 
+                        name : "wh_code", 
+                        allowBlank : true, 
+                        columnWidth : 0.25,
+                        getCondition:function(v){
+                            return "wh_code like '%" + v + "%' or wh_description like '%"+ v +"%'";
+                        }
+                    }],                    
                     dbColumns:[{
                         "text": "仓库ID",
                         "flex": 0,
@@ -263,6 +394,16 @@ Ext.define('saas.view.stock.appropriationInOut.FormPanelController', {
                  },{
                      field:'pd_inwhname',width:100
                  }],
+                 dbSearchFields:[{
+                    emptyText:'输入仓库编号或名称',
+                    xtype : "textfield", 
+                    name : "wh_code", 
+                    allowBlank : true, 
+                    columnWidth : 0.25,
+                    getCondition:function(v){
+                        return "wh_code like '%" + v + "%' or wh_description like '%"+ v +"%'";
+                    }
+                }],                 
                  dbColumns:[{
                      "text": "仓库ID",
                      "flex": 0,

+ 152 - 21
frontend/saas-web/app/view/stock/otherIn/FormPanelController.js

@@ -13,6 +13,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         // dataUrl:'http://localhost:9480/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
+                        defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
                             from:'id',to:'pi_vendid'
                         },{
@@ -29,10 +30,14 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         dbtplfield:"ve_name",
                         //放大镜窗口字段
                         dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
                             name : "ve_name", 
-                            fieldLabel : "供应商名称", 
-                            columnWidth : 0.25
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "ve_name like '%" + v + "%' or ve_code like '%"+ v +"%'";
+                            }
                         }],
                         dbColumns:[{
                             conditionCode:'id',
@@ -99,21 +104,23 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         dbtplfield:"cu_name",
                         //放大镜窗口字段
                         dbSearchFields:[{
+                            emptyText:'输入客户编号或名称',
                             xtype : "textfield", 
                             name : "cu_name", 
-                            fieldLabel : "客户名称", 
-                            columnWidth : 0.25
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "cu_name like '%" + v + "%' or cu_code like '%"+ v +"%'";
+                            }
                         }],
-                        dbColumns: [{
-                            conditionCode: 'id',
+                        dbColumns:[{
                             "text": "客户ID",
                             "flex": 0,
                             "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
                             "items": null
-                        }, {
-                            conditionCode: 'cu_code',
+                        },{
                             "text": "客户编号",
                             "flex": 1,
                             "dataIndex": "cu_code",
@@ -121,12 +128,41 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                             "xtype": "",
                             "items": null
                         }, {
-                            conditionCode: 'cu_name',
                             "text": "客户名称",
                             "flex": 1,
                             "dataIndex": "cu_name",
                             "xtype": "",
                             "items": null
+                        },{
+                            "text": "客户类型",
+                            "flex": 1,
+                            "dataIndex": "cu_name",
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "业务员",
+                            "flex": 1,
+                            "dataIndex": "cu_sellername",
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "cu_taxrate",
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "cu_promisedays",
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "额度",
+                            "flex": 1,
+                            "dataIndex": "cu_credit",
+                            "xtype": "",
+                            "items": null
                         }]
                     });
 
@@ -152,6 +188,12 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         }, {
                             from: 'pr_spec',
                             to: 'pr_spec'
+                        },{
+                            from:'pr_whid',to:'pd_whid'
+                        },{
+                            from:'pr_whcode',to:'pd_whcode'
+                        },{
+                            from:'pr_whname',to:'pd_whname'
                         }],
                         dbtpls: [{
                             field: 'pr_code',
@@ -163,38 +205,117 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                             field: 'pr_spec',
                             width: 100
                         }],
-                        dbColumns: [{
+                        //窗口字段设置
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号或物料名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "pr_code like '%" + v + "%' or pr_detail like '%"+ v +"%'";
+                            }
+                        }],                         
+                        dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
+                            "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
                             "items": null
-                        }, {
-                            "text": "物料编号",
-                            "flex": 1,
+                        },{
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
                             "width": 100,
                             "xtype": "",
                             "items": null
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 100,
                             "dataIndex": "pr_detail",
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料规格",
+                            "text": "规格",
                             "flex": 0,
                             "dataIndex": "pr_spec",
-                            "width": 200,
+                            "width": 100,
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料单位",
+                            "text": "单位",
                             "flex": 0,
-                            "dataIndex": "pr_unit",
-                            "width": 200,
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库id",
+                            "flex": 0,
+                            "dataIndex": "pr_whid",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库编号",
+                            "flex": 0,
+                            "dataIndex": "pr_whcode",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库",
+                            "flex": 0,
+                            "dataIndex": "pr_whname",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "总库存数",
+                            "flex": 0,
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "类型",
+                            "flex": 0,
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "型号",
+                            "flex": 0,
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "品牌",
+                            "flex": 0,
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "供应商",
+                            "flex": 0,
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "最小包装",
+                            "flex": 0,
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "L/T",
+                            "flex": 0,
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
                             "xtype": "",
                             "items": null
                         }]
@@ -228,6 +349,16 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                             field: 'pd_whname',
                             width: 100
                         }],
+                        dbSearchFields:[{
+                            emptyText:'输入仓库编号或名称',
+                            xtype : "textfield", 
+                            name : "wh_code", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "wh_code like '%" + v + "%' or wh_description like '%"+ v +"%'";
+                            }
+                        }],                        
                         dbColumns: [{
                             "text": "仓库ID",
                             "flex": 0,

+ 149 - 18
frontend/saas-web/app/view/stock/otherOut/FormPanelController.js

@@ -13,6 +13,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         // dataUrl:'http://localhost:9480/vendor/list',
                         addXtype: 'document-vendor-formpanel',
                         addTitle: '供应商资料',
+                        defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
                             from:'id',to:'pi_vendid'
                         },{
@@ -29,10 +30,14 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         dbtplfield:"ve_name",
                         //放大镜窗口字段
                         dbSearchFields:[{
+                            emptyText:'输入供应商编号或名称',
                             xtype : "textfield", 
                             name : "ve_name", 
-                            fieldLabel : "供应商名称", 
-                            columnWidth : 0.25
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "ve_name like '%" + v + "%' or ve_code like '%"+ v +"%'";
+                            }
                         }],                        
                         dbColumns:[{
                             conditionCode:'id',
@@ -94,13 +99,16 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         dbtplfield:"cu_name",
                         //放大镜窗口字段
                         dbSearchFields:[{
+                            emptyText:'输入客户编号或名称',
                             xtype : "textfield", 
                             name : "cu_name", 
-                            fieldLabel : "客户名称", 
-                            columnWidth : 0.25
-                        }],                        
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "cu_name like '%" + v + "%' or cu_code like '%"+ v +"%'";
+                            }
+                        }],
                         dbColumns:[{
-                            conditionCode:'id',
                             "text": "客户ID",
                             "flex": 0,
                             "dataIndex": "id",
@@ -108,7 +116,6 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             "xtype": "",
                             "items": null
                         },{
-                            conditionCode:'cu_code',
                             "text": "客户编号",
                             "flex": 1,
                             "dataIndex": "cu_code",
@@ -116,12 +123,41 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             "xtype": "",
                             "items": null
                         }, {
-                            conditionCode:'cu_name',
                             "text": "客户名称",
                             "flex": 1,
                             "dataIndex": "cu_name",
                             "xtype": "",
                             "items": null
+                        },{
+                            "text": "客户类型",
+                            "flex": 1,
+                            "dataIndex": "cu_name",
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "业务员",
+                            "flex": 1,
+                            "dataIndex": "cu_sellername",
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "税率",
+                            "flex": 1,
+                            "dataIndex": "cu_taxrate",
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "承付天数",
+                            "flex": 1,
+                            "dataIndex": "cu_promisedays",
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "额度",
+                            "flex": 1,
+                            "dataIndex": "cu_credit",
+                            "xtype": "",
+                            "items": null
                         }]
                     }) ;   
 
@@ -143,6 +179,12 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                             from:'pr_detail',to:'pr_detail'
                         },{
                             from:'pr_spec',to:'pr_spec'
+                        },{
+                            from:'pr_whid',to:'pd_whid'
+                        },{
+                            from:'pr_whcode',to:'pd_whcode'
+                        },{
+                            from:'pr_whname',to:'pd_whname'
                         }],
                         dbtpls:[{
                             field:'pr_code',width:100
@@ -151,38 +193,117 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         },{
                             field:'pr_spec',width:100
                         }],
+                        //窗口字段设置
+                        dbSearchFields:[{
+                            emptyText:'输入物料编号或物料名称',
+                            xtype : "textfield", 
+                            name : "search", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "pr_code like '%" + v + "%' or pr_detail like '%"+ v +"%'";
+                            }
+                        }],                        
                         dbColumns:[{
                             "text": "物料ID",
-                            "flex": 0,
-                            "dataIndex": "pr_id",
+                            "dataIndex": "id",
                             "width": 0,
                             "xtype": "",
                             "items": null
                         },{
-                            "text": "物料编号",
-                            "flex": 1,
+                            "text": "物料编号",       
                             "dataIndex": "pr_code",
                             "width": 100,
                             "xtype": "",
                             "items": null
                         }, {
                             "text": "物料名称",
-                            "flex": 1,
+                            "width": 100,
                             "dataIndex": "pr_detail",
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料规格",
+                            "text": "规格",
                             "flex": 0,
                             "dataIndex": "pr_spec",
-                            "width": 200,
+                            "width": 100,
                             "xtype": "",
                             "items": null
                         }, {
-                            "text": "物料单位",
+                            "text": "单位",
                             "flex": 0,
-                            "dataIndex": "pr_unit",
-                            "width": 200,
+                            "dataIndex": "pr_spec",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库id",
+                            "flex": 0,
+                            "dataIndex": "pr_whid",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库编号",
+                            "flex": 0,
+                            "dataIndex": "pr_whcode",
+                            "width": 0,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "仓库",
+                            "flex": 0,
+                            "dataIndex": "pr_whname",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "总库存数",
+                            "flex": 0,
+                            "dataIndex": "po_onhand",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "类型",
+                            "flex": 0,
+                            "dataIndex": "pr_kind",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "型号",
+                            "flex": 0,
+                            "dataIndex": "pr_orispeccode",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "品牌",
+                            "flex": 0,
+                            "dataIndex": "pr_brand",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "供应商",
+                            "flex": 0,
+                            "dataIndex": "pr_vendname",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "最小包装",
+                            "flex": 0,
+                            "dataIndex": "pr_zxbzs",
+                            "width": 100,
+                            "xtype": "",
+                            "items": null
+                        },{
+                            "text": "L/T",
+                            "flex": 0,
+                            "dataIndex": "pr_leadtime",
+                            "width": 100,
                             "xtype": "",
                             "items": null
                         }]
@@ -212,6 +333,16 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         },{
                             field:'pd_whname',width:100
                         }],
+                        dbSearchFields:[{
+                            emptyText:'输入仓库编号或名称',
+                            xtype : "textfield", 
+                            name : "wh_code", 
+                            allowBlank : true, 
+                            columnWidth : 0.25,
+                            getCondition:function(v){
+                                return "wh_code like '%" + v + "%' or wh_description like '%"+ v +"%'";
+                            }
+                        }],                        
                         dbColumns:[{
                             "text": "仓库ID",
                             "flex": 0,