日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Extjs FormPanel/TabPanel/GridPanel混合

發布時間:2023/12/15 编程问答 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Extjs FormPanel/TabPanel/GridPanel混合 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

tabPanel包含兩個FormPanel

Ext.onReady(function () {var tabsDemo = new Ext.TabPanel({renderTo: Ext.getBody(),activeTab: 0, //當前激活標簽frame: true,height: 700,items: [{title: '<% = GetLocalResourceObject("FileIssuedText") %>',items: [fileForm]}, {title: '<% = GetLocalResourceObject("ManualIssuedText") %>',items: [manualAllForm]}]});});

fileForm/manualAllForm是兩個FormPanel

var manualForm = new Ext.grid.EditorGridPanel({width: 700,height: 350,frame: true,//licksToEdit: 2, store: ds,cm: cm});var manualAllForm = new Ext.FormPanel({id: "frm3",autoHeight: true,width: 720,frame: true,items: [new Ext.form.NumberField({id: "txtIssuedNum",fieldLabel: '<% = GetLocalResourceObject("WriteAddRecordText") %>',allowDecimals: false, //不允許輸入小數 nanText: '<% = GetLocalResourceObject("WriteIntText") %>', //無效數字提示 allowNegative: false, //不允許輸入負數 maxValue: 100, //最大值 minValue: 1 //最小值 }),new Ext.Button({text: '<% = GetLocalResourceObject("SaveText") %>',handler: function () {var num = Ext.getCmp("txtIssuedNum").getValue();if (num < 1) return false;var count = ds.getCount();if (count == num) { return false; }else if (count < num) {var o = num - count;for (var i = 0; i < o; i++) {var iss = new ds.recordType({ISSBANK: "",ISSBRANCHBANK: "",CARDNUM: "",CARDHOLDER: "",AMOUNT: 0.00,MERDETAILREFNUM: "",MERREMARK: ""});ds.addSorted(iss);}}else {var oo = count - num;for (var i = 0; i < oo; i++) {ds.remove(ds.getAt(count - oo));}}}}),manualForm],buttons: [{text: '<% = GetLocalResourceObject("SaveInfoText") %>',handler: function () {var co = ds.getCount();if (co == 0) { Ext.Msg.alert('<% = GetLocalResourceObject("WarnText") %>', '<% = GetLocalResourceObject("WriteRecordText") %>'); return false; }var array = new Array();ds.each(function (record) {array.push(record.data);});var enable = true;for (var i = 0; i < array.length; i++) {var arr = array[i];if (arr.ISSBANK == "" || arr.ISSBRANCHBANK == "" || arr.CARDNUM == "" || arr.CARDHOLDER == "" || arr.AMOUNT < 0.1 || arr.MERDETAILREFNUM == "") {enable = false;}}if (!enable) {Ext.Msg.alert('<% = GetLocalResourceObject("PromptText") %>', '<% = GetLocalResourceObject("WriteFullDataText") %>'); return false;}Ext.Ajax.request({url: "../Handler/Issued.ashx",params: {method: "SaveInfo",dataStore: Ext.util.JSON.encode(array)},success: function (response, option) {var result = Ext.util.JSON.decode(response.responseText);if (result.Flag == true) {Ext.Msg.alert("Success", '<% = GetLocalResourceObject("IssuedSuccessText") %>');ds.removeAll();MerBatchStore.load();} else {Ext.Msg.alert("Fail", result.RespMessage);}},failure: function (response, option) {Ext.Msg.alert("Failed", result.RespMessage);}});}}, {text: '<% = GetLocalResourceObject("SaveApproveText") %>',handler: function () {var co = ds.getCount();if (co == 0) { Ext.Msg.alert('<% = GetLocalResourceObject("WarnText") %>', '<% = GetLocalResourceObject("WriteRecordText") %>'); return false; }var array = new Array();ds.each(function (record) {array.push(record.data);});Ext.Ajax.request({url: "../Handler/Issued.ashx",params: {method: "SaveApproveText",dataStore: Ext.util.JSON.encode(array)},success: function (response, option) {var result = Ext.util.JSON.decode(response.responseText);if (result.Flag == true) {Ext.Msg.alert("Success", '<% = GetLocalResourceObject("IssuedSuccessText") %>');ds.removeAll();} else {Ext.Msg.alert("Fail", result.RespMessage);}},failure: function (response, option) {Ext.Msg.alert("Failed", result.RespMessage);}});}}]});

manualForm是一個EditorGridPanel

包含在一個FormPanel manualAllForm中

總結

以上是生活随笔為你收集整理的Extjs FormPanel/TabPanel/GridPanel混合的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。