2023年6月20日 星期二

V120202E 清除 store 所有資料 - removeAll - clearData

 目的: V120202E 清除 store 所有資料

處理說明: 1>  var Tmp_gridstore = Ext.getCmp("sub_Grid").store;
                                          Tmp_gridstore.clearData();
                                     Tmp_gridstore.removeAll();


1>*.js
    Tmp_Str = Tmp_Str
                    + "申請單號(" + cur_rec.data["APNO"].toString() + ") <br> "
                    + "退庫歸儲完成!!<br>";
                Ext.Msg.alert('確認', Tmp_Str, ok2go);
                function ok2go(id) {          
                    console.log("id:", id);
                    if (id == 'ok') {
                        //mysuccessalert("退庫歸儲完成 !!");
                        //清空 [點料人員][退庫原因] & grid 資料
                        Ext.getCmp("sub_BKMG").setValue("");
                        Ext.getCmp("sub_APNO").setValue("");
                        Ext.getCmp("sub_CAUSE_REMARK").setValue("");
                        var Tmp_gridstore = Ext.getCmp("sub_Grid").store;
                        Tmp_gridstore.clearData();
                        Tmp_gridstore.removeAll();

                    }// end of if(id=='yes')
                } //end of callbackfunc


沒有留言:

張貼留言