From 5c3e1931fcdb01f3f3e293def15addac3d1a3558 Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Thu, 16 Feb 2023 16:34:59 +0800 Subject: [PATCH] 1 --- .../MsCustTruckFeeTemplateIndex.js | 84 ++++++++++++++++--- 1 file changed, 74 insertions(+), 10 deletions(-) diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsCustTruckFeeTemplate/MsCustTruckFeeTemplateIndex.js b/DSWeb/Areas/TruckMng/Viewsjs/MsCustTruckFeeTemplate/MsCustTruckFeeTemplateIndex.js index f390a37f..ef132b33 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsCustTruckFeeTemplate/MsCustTruckFeeTemplateIndex.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsCustTruckFeeTemplate/MsCustTruckFeeTemplateIndex.js @@ -14,7 +14,7 @@ Ext.extend(DsTruck.MsCustTruckFeeTemplateIndex, Ext.Panel, { //需求编号:SR2017061200005-3 initUIComponents: function () { this.AuditEdit = false; - + _this = this; //定义数据集 this.storeList = Ext.create('Ext.data.Store', { model: 'MsCustTruckFeeTemplate', @@ -127,7 +127,15 @@ Ext.extend(DsTruck.MsCustTruckFeeTemplateIndex, Ext.Panel, { lazyRender: false, name: 'CUSTOMERNAME', valueField: 'CustName', - displayField: 'CodeAndName' + displayField: 'CodeAndName', + enableKeyEvents: true, + listeners: { + keyup: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } }); this.storeListGoodName = Ext.create('Ext.data.Store', { @@ -168,7 +176,15 @@ Ext.extend(DsTruck.MsCustTruckFeeTemplateIndex, Ext.Panel, { fieldLabel: '商品名称', //'费用类型', valueField: 'GOODNAME', displayField: 'CODEANDNAME', - name: 'GOODNAME' + name: 'GOODNAME', + enableKeyEvents: true, + listeners: { + keyup: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } }); this.storeTransType = Ext.create('Ext.data.Store', { @@ -183,7 +199,15 @@ Ext.extend(DsTruck.MsCustTruckFeeTemplateIndex, Ext.Panel, { valueField: 'DC', displayField: 'NAME', forceSelection: true, - name: 'TRANTYPE' + name: 'TRANTYPE', + enableKeyEvents: true, + listeners: { + keyup: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } }); @@ -200,7 +224,15 @@ Ext.extend(DsTruck.MsCustTruckFeeTemplateIndex, Ext.Panel, { valueField: 'DC', displayField: 'NAME', forceSelection: true, - name: 'BSSTATUS' + name: 'BSSTATUS', + enableKeyEvents: true, + listeners: { + keyup: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } }); @@ -232,7 +264,15 @@ Ext.extend(DsTruck.MsCustTruckFeeTemplateIndex, Ext.Panel, { valueField: 'PORT', displayField: 'CODEANDNAME', forceSelection: true, - name: 'LOADPORT' + name: 'LOADPORT', + enableKeyEvents: true, + listeners: { + keyup: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } }); this.storeListTruckDistPort = Ext.create('Ext.data.Store', { @@ -265,7 +305,15 @@ Ext.extend(DsTruck.MsCustTruckFeeTemplateIndex, Ext.Panel, { valueField: 'PORT', displayField: 'CODEANDNAME', forceSelection: true, - name: 'DISTPORT' + name: 'DISTPORT', + enableKeyEvents: true, + listeners: { + keyup: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } }); @@ -296,7 +344,15 @@ Ext.extend(DsTruck.MsCustTruckFeeTemplateIndex, Ext.Panel, { items: [this.comboxTransStatus,{ fieldLabel: '计费方案名称', //'模板名称', labelWidth: 80, - name: 'TEMPLATENAME' + name: 'TEMPLATENAME', + enableKeyEvents: true, + listeners: { + specialkey: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } },this.comboxCustomerNameRef, this.comboxGoodCode,this.comboxTransType ] }, { @@ -305,7 +361,15 @@ Ext.extend(DsTruck.MsCustTruckFeeTemplateIndex, Ext.Panel, { defaultType: 'textfield', items: [{ fieldLabel: '合同号', //'模板名称', - name: 'CONTRACTNO' + name: 'CONTRACTNO', + enableKeyEvents: true, + listeners: { + specialkey: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } }, this.comboxLoadPort, this.comboxDistPort, { xtype: 'hiddenfield' }, { xtype: 'hiddenfield' } ] } @@ -467,7 +531,7 @@ Ext.extend(DsTruck.MsCustTruckFeeTemplateIndex, Ext.Panel, { sql = sql + getAndConSql(sql, GOODNAME, "GOODNAME='" + GOODNAME + "'"); var TEMPLATENAME = form.findField('TEMPLATENAME').getValue(); - sql = sql + getAndConSql(sql, TEMPLATENAME, "TEMPLATENAME='" + TEMPLATENAME + "'"); + sql = sql + getAndConSql(sql, TEMPLATENAME, "TEMPLATENAME like '%" + TEMPLATENAME + "%'"); var LOADPORT = form.findField('LOADPORT').getValue(); var DISTPORT = form.findField('DISTPORT').getValue();