Browse Source

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

zhuth 7 years ago
parent
commit
159d25d065

+ 14 - 140
frontend/saas-web/app/util/QueryUtil.js

@@ -24,7 +24,6 @@ Ext.define('saas.util.QueryUtil', {
                 me.getStoreMode(queryMoreForm);
                 me.getStoreMode(queryMoreForm);
             }
             }
         }
         }
-        console.log("Mode:"+Mode);
         if(Mode=="MAIN"){
         if(Mode=="MAIN"){
             grid._Mode = Mode;
             grid._Mode = Mode;
             grid.reconfigure(grid.store, grid._baseColumn);
             grid.reconfigure(grid.store, grid._baseColumn);
@@ -57,13 +56,12 @@ Ext.define('saas.util.QueryUtil', {
 				} else if (f.xtype == 'condatefield' && f.value != null ){
 				} else if (f.xtype == 'condatefield' && f.value != null ){
                     if(f.value.from != null){
                     if(f.value.from != null){
                         if(condition == ''){
                         if(condition == ''){
-                            condition += " date("+f.name+") between '"+f.value.from+"' and '"+f.value.to+"' ";
+                            condition += " ( date("+f.name+") between '"+Ext.Date.format(f.value.from,"Y-m-d H:i:s")+"' and '"+Ext.Date.format(f.value.to,"Y-m-d H:i:s")+"' )";
                         } else {
                         } else {
-                            condition += " AND date("+f.name+") between '"+f.value.from+"' and '"+f.value.to+"' ";
+                            condition += " AND ( date("+f.name+") between '"+Ext.Date.format(f.value.from,"Y-m-d H:i:s")+"' and '"+Ext.Date.format(f.value.to,"Y-m-d H:i:s")+"' )";
                         }
                         }
                     }
                     }
                 }else if(f.xtype == 'datefield' && f.value != null && f.value != '' ){
                 }else if(f.xtype == 'datefield' && f.value != null && f.value != '' ){
-                    debugger;
 					var v = Ext.Date.format(new Date(f.value), 'Y-m-d');
 					var v = Ext.Date.format(new Date(f.value), 'Y-m-d');
 					if(condition == ''){
 					if(condition == ''){
 						condition += "date("+f.name+")='"+v+"'";
 						condition += "date("+f.name+")='"+v+"'";
@@ -72,7 +70,6 @@ Ext.define('saas.util.QueryUtil', {
 					}
 					}
 				} else if(f.xtype == 'datetimefield' && f.value != null){
 				} else if(f.xtype == 'datetimefield' && f.value != null){
                     var v = Ext.Date.format(new Date(f.value), 'Y-m-d H:i:s');
                     var v = Ext.Date.format(new Date(f.value), 'Y-m-d H:i:s');
-                    debugger;
 					if(condition == ''){
 					if(condition == ''){
 						condition += 'date('+f.name + ")= '" + v + "'";
 						condition += 'date('+f.name + ")= '" + v + "'";
 					} else {
 					} else {
@@ -85,29 +82,18 @@ Ext.define('saas.util.QueryUtil', {
 					} else {
 					} else {
 						condition += ' AND ' + f.name + endChar + f.value;
 						condition += ' AND ' + f.name + endChar + f.value;
 					}
 					}
-				} else if(f.xtype == 'combo' && f.value != '$ALL'){
-					if(f.store.data.length > 1) {
-						if(condition == ''){
-							condition += '(';
-						} else {
-							condition += ' AND (';
-						}
-						var _a = '';
-						f.store.each(function(d, idx){
-							if(d.data.value != '$ALL') {
-								if(_a == ''){
-									_a += f.logic + "='" + d.data.value + "'";
-								} else {
-									_a += ' OR ' + f.logic + "='" + d.data.value + "'";
-								}
-							}
-						});
-						condition += _a + ')';
-					}
+				} else if(f.xtype == 'combobox' ){
+                    if(f.value != '$ALL'&&f.value!=null){
+                        if(condition == ''){
+                            condition = f.name+" = '"+f.value+"' ";
+                        } else {
+                            condition += ' AND '+f.name+" = '"+f.value+"' ";
+                        }
+                    }
 				} else if(f.xtype == 'multicombo' ){
 				} else if(f.xtype == 'multicombo' ){
-				    if(f.value){
+				    if(f.value && !me.contains(f.value, '$ALL', true)){
                         if(condition == ''){
                         if(condition == ''){
-                            condition += f.name + " in (" + f.value+")";
+                            condition = f.name + " in (" + f.value+")";
                         } else {
                         } else {
                             condition += ' AND ' +  f.name + " in (" + f.value+")";
                             condition += ' AND ' +  f.name + " in (" + f.value+")";
                         }
                         }
@@ -170,7 +156,7 @@ Ext.define('saas.util.QueryUtil', {
                                             var nameArr = f.name.split("#");
                                             var nameArr = f.name.split("#");
                                             Ext.each(nameArr, function(nameItem,index) {
                                             Ext.each(nameArr, function(nameItem,index) {
                                                 if(index==0){
                                                 if(index==0){
-                                                    condition = ' AND ('+(nameItem+ " like '%" +f.value + "%'");
+                                                    condition += ' AND ('+(nameItem+ " like '%" +f.value + "%'");
                                                 }else{
                                                 }else{
                                                     condition += " or "+nameItem+ " like '%" +f.value + "%' ";
                                                     condition += " or "+nameItem+ " like '%" +f.value + "%' ";
                                                 }
                                                 }
@@ -207,117 +193,5 @@ Ext.define('saas.util.QueryUtil', {
 			substr = substr.toLowerCase();
 			substr = substr.toLowerCase();
 		}
 		}
 		return string.indexOf(substr) > -1;
 		return string.indexOf(substr) > -1;
-    },
-    /**
-     * 
-     */
-    queryData: function(grid,condition){
-        // var me = this;
-        //     if(Ext.isEmpty(condition)){
-        //         condition =" 1=1 ";
-        //     }
-        //     var params = { keyword: condition,number:1,size:15 };
-        //     var dataRes = {
-        //         url :grid.listUrl,
-        //         async:false,
-        //         params:params
-        //     };
-        //     me.BaseUtil.request(dataRes)
-        //     .then(function(response) {
-        //         var res = Ext.decode(response.responseText);
-        //         if(res.success) {
-        //             var data = res.data;
-        //             console.log(data);
-        //              grid.getStore().loadData(data.list);
-        //              grid.fireEvent('afterLoadData', grid, data.list);
-        //         }
-        //     })
-        //     .catch(function(response) {
-        //         console.log(response);
-        //         // something...
-        //     });
-    },
-    onQuery: function(parentForm,queryMoreForm){
-        var me = this,
-            grid = parentForm.down('grid'),
-            queryForm = parentForm.down('form'),
-            condition = me.getFormCondition(queryForm),
-            Mode = me.getStoreMode(queryForm);
-        if(queryMoreForm){//更多查询
-            if(!Ext.isEmpty(condition)){
-                condition = " and ( "+me.getStoreMode(queryMoreForm)+" ) ";
-            }else{
-                condition = me.getStoreMode(queryMoreForm);
-            }
-            if(Mode=="MAIN"){
-                me.getStoreMode(queryMoreForm);
-            }
-        }
-        console.log("condition:"+condition);
-        condition = " 1=1 ";
-        if(Mode=="MAIN"){
-            console.log("Mode:"+Mode+",查询当前列表");
-            grid.loadPage(1);
-        }else{
-            console.log("Mode:"+Mode+",查询当前关联列表");
-            //若明细字段含明细字段注意切换数据源 grid.reconfigure(store, columns);
-            //关联viewName = 关联viewName+"-RelativeGrid"
-            grid.loadPage(1);
-        }
-
-    },
-    add10EmptyRow: function(grid) {
-        var store = grid.getStore(),
-            selectedRecord = grid.selModel.lastSelected,
-            datas = [];
-        Ext.Array.each(new Array(10), function() {
-            datas.push({});
-        })
-        store.insert(store.indexOf(selectedRecord) + 1, datas);
-    },
-    /**
-     * 获取grid被选数据
-	 * grid:原始字符串
-	 */
-    getGridSelected:function(grid){
-        var items = grid.selModel.getSelection(),
-        data = new Array();
-		Ext.each(items, function(item, index){
-			if(!Ext.isEmpty(item.data[grid._idField])&&!Ext.isEmpty(item.data[grid._codeField])){
-				var o = new Object();
-				if(grid._idField){
-					o['id'] = item.data[grid._idField];
-                }
-                if(grid._codeField){
-					o['code'] = item.data[grid._codeField];
-                }
-                o['name'] = '';
-				data.push(o);
-            }
-		});
-		return data;
-    },
-    /**
-     * 发起批量操作请求
-	 * grid:原始字符串
-	 */
-    vastRes:function(url,params){
-        console.log("params",params);
-        var me = this,
-        pp ={baseDTOs:params} ;
-        console.log("pp",pp);
-        me.BaseUtil.request({
-                url: url,
-                params: JSON.stringify(pp),
-                method: 'POST',
-            })
-            .then(function() {
-                Ext.Msg.alert('提示','操作成功');
-            })
-            .catch(function(response) {
-                console.log(response);
-                Ext.Msg.alert('提示','操作失败');
-            });
-        }
-    
+    }
 });
 });

+ 4 - 9
frontend/saas-web/app/view/core/query/MoreQueryFormPanel.js

@@ -28,7 +28,9 @@ Ext.define('saas.view.core.query.MoreQueryFormPanel', {
                 items: [{
                 items: [{
                     xtype: 'button',
                     xtype: 'button',
                     text: '重置',
                     text: '重置',
-                    handler: me.resetQuery
+                    handler: function(btn){
+                        btn.ownerCt.ownerCt.reset();
+                    }
                 },'->',{
                 },'->',{
                     xtype: 'button',
                     xtype: 'button',
                     text: '查询',
                     text: '查询',
@@ -46,18 +48,11 @@ Ext.define('saas.view.core.query.MoreQueryFormPanel', {
         });
         });
         me.callParent(arguments);
         me.callParent(arguments);
     },
     },
-    resetQuery: function(btn){
-        console.log("重置窗口");
-        btn.ownerCt.ownerCt.reset();
-    },
     onQueryMore: function(btn){
     onQueryMore: function(btn){
-        console.log("更多查询");
         var me = this,
         var me = this,
             queryMoreForm = me.up('core-query-queryformpanel'),
             queryMoreForm = me.up('core-query-queryformpanel'),
             parentForm = queryMoreForm.up('core-query-formpanel')
             parentForm = queryMoreForm.up('core-query-formpanel')
-            debugger;
-            console.log(parentForm);
-            parentForm.QueryUtil.onQuery(parentForm,queryMoreForm);
+            parentForm.QueryUtil.turnRelativeGrid(grid,queryForm,queryMoreForm);
     }
     }
     
     
 });
 });

+ 51 - 20
frontend/saas-web/app/view/core/query/QueryGridPanel.js

@@ -5,7 +5,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
     //工具类
     //工具类
     QueryUtil: Ext.create('saas.util.QueryUtil'),
     QueryUtil: Ext.create('saas.util.QueryUtil'),
     GridUtil: Ext.create('saas.util.GridUtil'),
     GridUtil: Ext.create('saas.util.GridUtil'),
-
+    BaseUtil: Ext.create('saas.util.BaseUtil'),
     //字段属性
     //字段属性
     _baseColumn: [],
     _baseColumn: [],
     _relativeColumn: [],
     _relativeColumn: [],
@@ -37,7 +37,6 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                 proxy: {
                 proxy: {
                     type: 'ajax',
                     type: 'ajax',
                     url: me._baseVastUrl+'list',
                     url: me._baseVastUrl+'list',
-                    //url: 'http://192.168.253.58:8800/purchase/list',
                     actionMethods: {
                     actionMethods: {
                         read: 'GET'
                         read: 'GET'
                     },
                     },
@@ -56,10 +55,9 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                         if (Ext.isEmpty(condition)) {
                         if (Ext.isEmpty(condition)) {
                             condition = " 1=1 ";
                             condition = " 1=1 ";
                         }
                         }
-                        if(mode){
+                        if(!mode){
                             mode='MAIN';
                             mode='MAIN';
                         }
                         }
-                        console.log("condition:" + condition);
                         Ext.apply(store.proxy.extraParams, {
                         Ext.apply(store.proxy.extraParams, {
                             number: op._page,
                             number: op._page,
                             size: store.pageSize,
                             size: store.pageSize,
@@ -79,6 +77,9 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
                 }, {
                 }, {
                     text: '审核',
                     text: '审核',
                     handler: me.onAudit
                     handler: me.onAudit
+                }, {
+                    text: '反审核',
+                    handler: me.onUnAudit
                 }, {
                 }, {
                     text: '打印',
                     text: '打印',
                     handler: me.onPrint
                     handler: me.onPrint
@@ -102,7 +103,6 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
         });
         });
         me.callParent(arguments);
         me.callParent(arguments);
     },
     },
-
     listeners: {
     listeners: {
         itemdblClick: function (tableView, record, item, index, e, eOpts) {
         itemdblClick: function (tableView, record, item, index, e, eOpts) {
             var grid = tableView.up('grid'),
             var grid = tableView.up('grid'),
@@ -122,7 +122,6 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
             }
             }
         }
         }
     },
     },
-
     getFields: function() {
     getFields: function() {
         var me = this;
         var me = this;
         return me.columns.filter(function(c) {
         return me.columns.filter(function(c) {
@@ -132,7 +131,7 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
         });
         });
     },
     },
     onAddMore: function (btn) {
     onAddMore: function (btn) {
-        var grid = btn.ownerCt.ownerCt,
+        var grid = this.getGrid(btn),
             mainTab = Ext.getCmp('main-tab-panel'),
             mainTab = Ext.getCmp('main-tab-panel'),
             id = grid.xtype + '_add';
             id = grid.xtype + '_add';
             existingItem = mainTab.down('[id=' + id + ']');
             existingItem = mainTab.down('[id=' + id + ']');
@@ -146,12 +145,10 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
         }
         }
     },
     },
     onAudit: function(btn){
     onAudit: function(btn){
-        var grid = btn.ownerCt.ownerCt,
-        vastUrl = grid._baseVastUrl+"batchAudit",
-        selectsd = grid.QueryUtil.getGridSelected(grid),
-        currentPage = grid.getStore().currentPage;
-        grid.QueryUtil.vastRes(vastUrl,selectsd);
-        grid.getStore().loadPage(currentPage);
+        btn.ownerCt.ownerCt.vastOperation("batchAudit");
+    },
+    onUnAudit:function(btn){
+        btn.ownerCt.ownerCt.vastOperation("batchUnAudit");
     },
     },
     onPrint: function () {
     onPrint: function () {
         console.log("打印");
         console.log("打印");
@@ -160,11 +157,45 @@ Ext.define('saas.view.core.query.QueryGridPanel', {
         console.log("导出");
         console.log("导出");
     },
     },
     onDelete: function (btn) {
     onDelete: function (btn) {
-        var grid = btn.ownerCt.ownerCt,
-        vastUrl = grid._baseVastUrl+"batchDelete",
-        selectsd = grid.QueryUtil.getGridSelected(grid),
-        currentPage = grid.getStore().currentPage;;
-        grid.QueryUtil.vastRes(vastUrl,selectsd);
-        grid.getStore().loadPage(currentPage);
-    }
+        btn.ownerCt.ownerCt.vastOperation("batchDelete");
+    },
+    vastOperation :function(type){
+        var me = this,
+        params = JSON.stringify(me.getGridSelected());
+        me.BaseUtil.request({
+                url: me._baseVastUrl+type,
+                params: params,
+                method: 'POST',
+                async:false
+            })
+            .then(function() {
+                Ext.Msg.alert('提示','操作成功');
+            })
+            .catch(function(response) {
+                Ext.Msg.alert('提示','操作失败');
+            });
+            me.getStore().loadPage(1);
+    },
+    /**
+     * 获取grid被选数据
+	 * grid:原始字符串
+	 */
+    getGridSelected:function(){
+        var me = this,
+            items = me.selModel.getSelection(),
+            data = new Array() ;
+		Ext.each(items, function(item, index){
+			if(!Ext.isEmpty(item.data[me._idField])&&!Ext.isEmpty(item.data[me._codeField])){
+				var o = new Object();
+				if(me._idField){
+					o['id'] = item.data[me._idField];
+                }
+                if(me._codeField){
+					o['code'] = item.data[me._codeField];
+                }
+				data.push(o);
+            }
+		});
+		return {baseDTOs:data};
+    } 
 });
 });

+ 20 - 60
frontend/saas-web/app/view/purchase/purchase/QueryPanel.js

@@ -16,49 +16,12 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0
         columnWidth: 0
     }, {
     }, {
-        xtype: 'dbfindtrigger',
+        xtype: 'textfield',
         name: 'pu_code',
         name: 'pu_code',
         bind: '{pu_code}',
         bind: '{pu_code}',
         fieldLabel: '单据编号',
         fieldLabel: '单据编号',
         allowBlank: true,
         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
-        }]
+        columnWidth: 0.25
     }, {
     }, {
         xtype: 'condatefield',
         xtype: 'condatefield',
         name: 'pu_date',
         name: 'pu_date',
@@ -72,9 +35,7 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         bind: '{pu_vendcode}',
         bind: '{pu_vendcode}',
         fieldLabel: '供应商编号',
         fieldLabel: '供应商编号',
         allowBlank: true,
         allowBlank: true,
-        columnWidth: 0.25,
-        configUrl: 'resources/json/purchase/vendorColumnsDbfind.json',
-        dataUrl: 'resources/json/purchase/vendorDataDbfind.json'
+        columnWidth: 0.25
     }, {
     }, {
         xtype: 'textfield',
         xtype: 'textfield',
         name: 'pu_vendname',
         name: 'pu_vendname',
@@ -85,14 +46,13 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
     }, {
     }, {
         xtype: 'dbfindtrigger',
         xtype: 'dbfindtrigger',
         name: 'pd_prodcode#pd_prodcode',
         name: 'pd_prodcode#pd_prodcode',
+        //#pr_detail
         bind: '{pd_prodcode}',
         bind: '{pd_prodcode}',
         fieldLabel: '物料编号',
         fieldLabel: '物料编号',
         fieldMode: 'DETAIL',
         fieldMode: 'DETAIL',
         queryType: 'VAG',
         queryType: 'VAG',
         allowBlank: true,
         allowBlank: true,
-        columnWidth: 0.25,
-        configUrl: 'resources/json/purchase/vendorColumnsDbfind.json',
-        dataUrl: 'resources/json/purchase/vendorDataDbfind.json'
+        columnWidth: 0.25
     }, {
     }, {
         xtype: 'textfield',
         xtype: 'textfield',
         name: 'pr_detail',
         name: 'pr_detail',
@@ -102,35 +62,35 @@ Ext.define('saas.view.purchase.purchase.QueryPanel', {
         columnWidth: 0.25
         columnWidth: 0.25
     }, {
     }, {
         xtype: 'combobox',
         xtype: 'combobox',
-        name: 'pr_statuscode',
-        // bind: '{pr_statuscode}',
+        name: 'pu_statuscode',
+       // bind: '{pu_statuscode}',
         fieldLabel: '审核状态',
         fieldLabel: '审核状态',
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0.25,
         columnWidth: 0.25,
         queryMode: 'local',
         queryMode: 'local',
-        displayField: 'pr_status',
-        valueField: 'pr_statuscode',
+        displayField: 'pu_status',
+        valueField: 'pu_statuscode',
+        editable:false,
         store: Ext.create('Ext.data.ArrayStore', {
         store: Ext.create('Ext.data.ArrayStore', {
-            fields: ['pr_statuscode', 'pr_status'],
-            data: [
-                ["$ALL", "全部"],
-                ["AUDITED", "已审核"],
-                ["UNAUDITED", "未审核"]
-            ]
+        fields: ['pu_statuscode', 'pu_status'],
+        data: [
+            ["$ALL", "全部"],
+            ["AUDITED", "已审核"],
+            ["UNAUDITED", "未审核"]
+        ]
         })
         })
     }, {
     }, {
         xtype: 'multicombo',
         xtype: 'multicombo',
         name: 'pu_acceptstatuscode',
         name: 'pu_acceptstatuscode',
         bind: '{pu_acceptstatuscode}',
         bind: '{pu_acceptstatuscode}',
-        readOnly: false,
-        editable: false,
         fieldLabel: '入库状态',
         fieldLabel: '入库状态',
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0.25,
         columnWidth: 0.25,
         datas: [
         datas: [
-            ["TURNOUT", "已入库"],
-            ["NOOUT", "未入库"],
-            ["PARTOUT", "部分入库"]
+            ["$ALL", "全部"],
+            ["TURNIN", "已入库"],
+            ["NOIN", "未入库"],
+            ["PARTIN", "部分入库"]
         ]
         ]
     }],
     }],
     moreQueryFormItems: [{
     moreQueryFormItems: [{

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

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

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

@@ -68,12 +68,15 @@ Ext.define('saas.view.purchase.purchaseIn.FormController', {
                         conditionCode:'pr_code',
                         conditionCode:'pr_code',
                         dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
                         dataUrl:'http://192.168.253.41:9480/api/document/product/getProductsByCondition',
                         dbfinds:[{
                         dbfinds:[{
-                            from:'pr_code',to:'pd_prodcode'
+                            from:'pr_code',to:'pd_prodcode',
+                            from:'pr_unit',to:'pd_unit'
                         }],
                         }],
                         dbtpls:[{
                         dbtpls:[{
                             field:'pr_code',width:100
                             field:'pr_code',width:100
                         },{
                         },{
                             field:'pr_detail',width:100
                             field:'pr_detail',width:100
+                        },{
+                            field:'pr_unit',width:100
                         }],
                         }],
                         dbColumns:[{
                         dbColumns:[{
                             "text": "物料ID",
                             "text": "物料ID",
@@ -102,6 +105,13 @@ Ext.define('saas.view.purchase.purchaseIn.FormController', {
                             "width": 200,
                             "width": 200,
                             "xtype": "",
                             "xtype": "",
                             "items": null
                             "items": null
+                        }, {
+                            "text": "物料单位",
+                            "flex": 0,
+                            "dataIndex": "pr_unit",
+                            "width": 200,
+                            "xtype": "",
+                            "items": null
                         }]
                         }]
                     }) ;   
                     }) ;   
 
 

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

@@ -15,48 +15,12 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0
         columnWidth: 0
     }, {
     }, {
-        xtype: 'dbfindtrigger',
+        xtype: 'textfield',
         name: 'pi_inoutno',
         name: 'pi_inoutno',
         bind: '{pi_inoutno}',
         bind: '{pi_inoutno}',
         fieldLabel: '单据编号',
         fieldLabel: '单据编号',
         allowBlank: true,
         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
-        }]
+        columnWidth: 0.25
     }, {
     }, {
         xtype: 'condatefield',
         xtype: 'condatefield',
         name: 'pu_date',
         name: 'pu_date',
@@ -65,14 +29,13 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0.5
         columnWidth: 0.5
     }, {
     }, {
-        xtype: 'dbfindtrigger',
+        xtype: 'textfield',
         name: 'pu_vendcode',
         name: 'pu_vendcode',
         bind: '{pu_vendcode}',
         bind: '{pu_vendcode}',
         fieldLabel: '供应商编号',
         fieldLabel: '供应商编号',
         allowBlank: true,
         allowBlank: true,
-        columnWidth: 0.25,
-        configUrl: 'resources/json/purchase/vendorColumnsDbfind.json',
-        dataUrl: 'resources/json/purchase/vendorDataDbfind.json'
+        hidden:true,
+        columnWidth: 0.25
     }, {
     }, {
         xtype: 'textfield',
         xtype: 'textfield',
         name: 'pu_vendname',
         name: 'pu_vendname',
@@ -87,12 +50,11 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         fieldLabel: '物料编号',
         fieldLabel: '物料编号',
         fieldMode: 'DETAIL',
         fieldMode: 'DETAIL',
         queryType:'VAG',
         queryType:'VAG',
+        hidden:true,
         allowBlank: true,
         allowBlank: true,
-        columnWidth: 0.25,
-        configUrl: 'resources/json/purchase/vendorColumnsDbfind.json',
-        dataUrl: 'resources/json/purchase/vendorDataDbfind.json'
+        columnWidth: 0.25
     }, {
     }, {
-        xtype: 'textfield',
+        xtype: 'dbfindtrigger',
         name: 'pr_detail',
         name: 'pr_detail',
         bind: '{pr_detail}',
         bind: '{pr_detail}',
         fieldLabel: '物料名称',
         fieldLabel: '物料名称',
@@ -106,8 +68,8 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0.25,
         columnWidth: 0.25,
         queryMode: 'local',
         queryMode: 'local',
-            displayField: 'pr_status',
-            valueField: 'pr_statuscode',
+        displayField: 'pr_status',
+        valueField: 'pr_statuscode',
         store: Ext.create('Ext.data.ArrayStore', {
         store: Ext.create('Ext.data.ArrayStore', {
             fields: ['pr_statuscode', 'pr_status'],
             fields: ['pr_statuscode', 'pr_status'],
             data: [
             data: [
@@ -128,7 +90,7 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         valueField: 'pu_acceptstatuscode',
         valueField: 'pu_acceptstatuscode',
         store: Ext.create('Ext.data.ArrayStore', {
         store: Ext.create('Ext.data.ArrayStore', {
             fields: ['pu_acceptstatuscode', 'pu_acceptstatus'],
             fields: ['pu_acceptstatuscode', 'pu_acceptstatus'],
-            data: [
+            datas: [
                 ["$ALL", "全部"],
                 ["$ALL", "全部"],
                 ["TURNOUT", "已入库"],
                 ["TURNOUT", "已入库"],
                 ["NOOUT", "未入库"],
                 ["NOOUT", "未入库"],
@@ -157,9 +119,9 @@ Ext.define('saas.view.purchase.purchaseIn.QueryPanel', {
         columnWidth: 1
         columnWidth: 1
     }],
     }],
     queryGridConfig: {
     queryGridConfig: {
-        _idField:'pu_id',
-        _codeField:'pu_code',
-        _title:'采购单',
+        _idField:'pi_id',
+        _codeField:'pi_inoutno',
+        _title:'采购验收单',
         _addXtype:'test-order-formpanel',
         _addXtype:'test-order-formpanel',
         _baseVastUrl:'http://192.168.253.58:8800/purchase/',
         _baseVastUrl:'http://192.168.253.58:8800/purchase/',
         _baseColumn: [{
         _baseColumn: [{

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

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

+ 9 - 15
frontend/saas-web/app/view/test/query/QueryPanel.js

@@ -114,29 +114,23 @@ Ext.define('saas.view.test.query.QueryPanel', {
             fields: ['pr_statuscode', 'pr_status'],
             fields: ['pr_statuscode', 'pr_status'],
             data: [
             data: [
                 ["$ALL", "全部"],
                 ["$ALL", "全部"],
-                ["=AUDITED", "已审核"],
-                ["<>AUDITED", "未审核"]
+                ["AUDITED", "已审核"],
+                ["AUDITED", "未审核"]
             ]
             ]
         })
         })
     }, {
     }, {
-        xtype: 'combobox',
+        xtype: 'multicombo',
         name: 'pu_acceptstatuscode',
         name: 'pu_acceptstatuscode',
         bind: '{pu_acceptstatuscode}',
         bind: '{pu_acceptstatuscode}',
         fieldLabel: '入库状态',
         fieldLabel: '入库状态',
         allowBlank: true,
         allowBlank: true,
         columnWidth: 0.25,
         columnWidth: 0.25,
-        queryMode: 'local',
-        displayField: 'pu_acceptstatus',
-        valueField: 'pu_acceptstatuscode',
-        store: Ext.create('Ext.data.Store', {
-            fields: ['pu_acceptstatuscode', 'pu_acceptstatus'],
-            data: [
-                ["$ALL", "全部"],
-                ["=TURNOUT", "已入库"],
-                ["=NULL", "未入库"],
-                ["=PARTOUT", "部分入库"]
-            ]
-        })
+        datas: [
+            ["$ALL", "全部"],
+            ["TURNOUT", "已入库"],
+            ["NOOUT", "未入库"],
+            ["PARTOUT", "部分入库"]
+        ]
     }],
     }],
     moreQueryFormItems: [{
     moreQueryFormItems: [{
         xtype: 'textfield',
         xtype: 'textfield',