浏览代码

客户资料界面查询条件优化

rainco 7 年之前
父节点
当前提交
085ad69e0a

+ 6 - 8
frontend/saas-web/app/view/document/customer/BasePanel.js

@@ -6,23 +6,22 @@ Ext.define('saas.view.document.customer.BasePanel', {
     viewModel: 'document-customer-basepanel',
 
     searchField:[{
-        xtype : "textfield", 
+        xtype:'customerDbfindTrigger',
         name : "cu_code", 
         emptyText : "客户编号", 
-        width:90,
+        width:140,
     },{
         xtype : "textfield", 
         name : "cu_name", 
         emptyText : "客户名称", 
-        width:90,
+        width:140,
     },{
-        editable:false,
-        hiddenBtn:true,
         xtype : "remotecombo", 
         storeUrl:'/api/document/customerkind/getCombo',
         name : "cu_type", 
         emptyText : "客户类型", 
-        width:120,
+        width:140,
+        hiddenBtn:true
     },{
         xtype : "textfield", 
         name : "cu_sellername", 
@@ -87,7 +86,6 @@ Ext.define('saas.view.document.customer.BasePanel', {
     _formXtype:'document-customer-formpanel',
     _title:'客户资料',
     _deleteUrl:'/api/document/customer/delete/',
-    // _dataUrl:'/api/ducument/customer/list',
     _batchOpenUrl:'/api/document/customer/batchOpen',
     _batchCloseUrl:'/api/document/customer/batchClose',
     _batchDeleteUrl:'/api/document/customer/batchDelete',
@@ -106,7 +104,7 @@ Ext.define('saas.view.document.customer.BasePanel', {
         },{
             text : "客户编号", 
             width : 200.0, 
-            dataIndex : "cu_code", 
+            dataIndex : "cu_code"
         }, 
         {
             text : "客户名称", 

+ 23 - 0
frontend/saas-web/app/view/document/customer/BasePanelController.js

@@ -5,6 +5,29 @@ Ext.define('saas.view.document.customer.BasePanelController', {
     init: function (form) {
         var me = this;
         this.control({
+            // 主表-客户编号
+            'customerDbfindTrigger[name=cu_code]':{
+                beforerender:function(f){
+                    Ext.apply(f,{
+                        //赋值 
+                        dbfinds:[{
+                            from:'id',to:'id',ignore:true
+                        },{
+                            from:'cu_code',to:'cu_code'
+                        },{
+                            from:'cu_name',to:'cu_name'
+                        },{
+                            from:'cu_sellername',to:'cu_sellername'
+                        },{
+                            from:'cu_promisedays',to:'cu_promisedays'
+                        },{
+                            from:'cu_credit',to:'cu_credit'
+                        },{
+                            from:'cu_statuscode',to:'cu_statuscode'
+                        }],
+                    }) ;   
+                }
+            }
         });
     }
 });