目的: V20301 -[顯示資料]鈕 - fireHandler - 判斷直接按按鈕, 或由 fireHandler 觸發
處理說明: 1>V20301 -[顯示資料]鈕 - fireHandler - 判斷直接按按鈕, 或由 fireHandler 觸發
2> handler: function (btn,e) { }
若 .fireHandler() ,則 e 空白
2> handler: function (btn,e) { }
若 .fireHandler() ,則 e 空白
若直接按按鈕,則 e 非空白
{
xtype: 'button',
id: 'btn_Show',
flex: 2,
border: 1,
text: '資料顯示',
iconCls: 'icon-search',
handler: function (btn,e) {
//若按[顯示資料]鈕,則清除 PK_LIST 及 ALL_LIST
//若 call .firehadler(確認轉待發工), 則不清除 PK_LIST 及 ALL_LIST
if (!checkisnull(e)) {
CHK_PK_OBJ.PK_LIST = [];
CHK_PK_OBJ.ALL_LIST = [];
}
var np = s_JSON('s_form'); //TMFunction.js, 組合form上的查詢條件為json參數傳遞
console.log("Ext.getCmp('s_STATFM') : ", Ext.getCmp('s_STATFM'));
np["s_STATFM"] = Ext.getCmp('s_STATFM').getValue();
console.log(" np[s_STATFM] : ", np["s_STATFM"]);
var Proc_Msg;
try {
Proc_Msg = new Ext.LoadMask(Ext.getCmp("s_PROCMSG"),
{ msg: '交修件資料顯示處理中, 請稍候...', }
);
Proc_Msg.show();//使用 mask 需手動呼叫show() 方法下
//getGridData_M --> 轉工只有曾在於工作中心就會列入,後來改為 [目前工作中心]=xxxx , 才顯示
//gridstore.getProxy().url = '../api/V80205API/getGridData_M';
//2022/06/15 ..過濾條件若[目前工作中心]有值,則過濾 [目前工作中心]=xxxx, 其他 工作中心資料不顯示
// url 改為 getGridData_M_sub_WC --> 同 [過濾目前工作中心]鈕,的處理方法 , gridstore.getProxy().url = '../api/V20301API/getGridData_M';
gridstore.getProxy().extraParams = np; //分頁OK,篩選條件OK
console.log("1 reloadGridData - before");
Ext.getCmp('grid_Single').reloadGridData();
console.log("2 reloadGridData - after");
}
finally {
Proc_Msg.hide(); //使用 mask 需手動呼叫hide() 方法下
}
}
}, // end of 顯示資料