2024年8月27日 星期二

V80202 - 過濾欄位 - 多個欄位挑選其中一欄當過濾條件 - filter - 顯示資料 - 依過濾欄位值,過濾資料

 目的: V80202 過濾欄位 - 多個欄位挑選其中一欄當過濾條件 - filter
                          - 顯示資料  - 依過濾欄位值,過濾資料
處理說明:
   1>建立過濾條件1/2/3:
        var cmp_filter1 = get_cmp_filter1("過濾條件1", "s_filter1", 80, 80, Tmp_Store);
        var cmp_filter2 = get_cmp_filter1("過濾條件2", "s_filter2", 80, 80, Tmp_Store);
        var cmp_filter3 = get_cmp_filter1("過濾條件3", "s_filter3", 80, 80, Tmp_Store);

2>建立過濾條件的選項內容(store):
//combo 選項
var Tmp_Store = Ext.create("Ext.data.Store", { 

fields: ["value", "displayName"],
data: [

{ value: "",                   displayName: "請選擇", },
{ value: "ECNO",        displayName: "EO ECN", },
{ value: "PROCWC", displayName: "生產工廠", },
{ value: "PN",             displayName: "件號", },
{ value: "AMMNO", displayName: "AMM單號", },
]

}

3>若已挑選選項,則其他過濾條件不含該選項
var onSelect = function (combo, records) {
        var record = records[0] || records;
        var cur_value = record.get("value");
        // 更新 selectedValues 對象
        if (cur_value != '') {
            selectedValues[combo.id] = cur_value;            
        } else {
            selectedValues[combo.id] = null; //挑選到"請選擇"要清空已選中的選項
            console.log("selectedValues:", selectedValues);
        };

//更新其他下拉列表的選項,store 的內容<>目前過濾條件的挑選值且store 的內容<>目前挑選值
        var Tmp_filter_Ary = ['s_filter1', 's_filter2', 's_filter3'];  //過濾條件的 Array
        Tmp_filter_Ary.forEach(function (id) {
            if (id !== combo.id) { //其他過濾條件
                var otherCombo = Ext.getCmp(id);
                otherCombo.getStore().clearFilter();  //清除  store.filter 內容
                otherCombo.getStore().filterBy(function (record) {
                   //filterBy function , 若為 true ,則包含該選項     
                   //若store值= 目前挑選值,則不加入
                    var Tmp_isAdd = true;
                    if (record.get('value') == cur_value)
                        Tmp_isAdd = false;   
     
     //若store值= 已挑選欄位值,則不加入                       
  var selectedValues_Ary = Object.keys(selectedValues).map((key) => [key, selectedValues[key]]);
                    for (i = 0; i < selectedValues_Ary.length; i++) {
                        if (record.get('value') == selectedValues[i])
                            Tmp_isAdd = false;
                    }
                    return Tmp_isAdd;
                });
            }
        });
    }; // end of onselection


//挑選欄位值時,若欄位值在SelectedValues內,則不包含該項
var onExpand= function (combo) {
        combo.getStore().clearFilter();
        var otherSelectedValues = ['s_filter1', 's_filter2', 's_filter3']
              .filter(otherId => otherId !== combo.id).map(otherId => selectedValues[otherId]);
        combo.getStore().filterBy(function (record) {
            return !otherSelectedValues.includes(record.get('value'));
        });
    }








1>*.js
//combo 選項 
    var Tmp_Store = Ext.create("Ext.data.Store", {
        fields: ["value", "displayName"],
        data: [
            { value: "", displayName: "請選擇", },
            { value: "ECNO", displayName: "EO  ECN", },
            { value: "PROCWC", displayName: "生產工廠", },
            { value: "PN", displayName: "件號", },
            { value: "AMMNO", displayName: "AMM單號", },
        ]
    }
    );
    

    //儲存combox目前選擇的項目
    var selectedValues = {        
        s_filter1: null,
        s_filter2: null,
        s_filter3: null,
    };

    var onSelect = function (combo, records) {
        myalert("onSelect !!" + combo.id);
        console.log("records:", records);
        var record = records[0] || records;
        console.log("record:", record);
        var cur_value = record.get("value");
        console.log("cur_value:", cur_value);
        // 更新 selectedValues 對象
        if (cur_value != '') {
            selectedValues[combo.id] = cur_value;            
        } else {
            selectedValues[combo.id] = null; //挑選到"請選擇"要清空已選中的選項
            console.log("selectedValues:", selectedValues);
        };

//更新其他下拉列表的選項, store 的內容<>目前過濾條件的挑選值且 store 的內容<>目前挑選值
        var Tmp_filter_Ary = ['s_filter1', 's_filter2', 's_filter3'];  //過濾條件的 Array
        Tmp_filter_Ary.forEach(function (id) {
            if (id !== combo.id) {
                var otherCombo = Ext.getCmp(id);
                otherCombo.getStore().clearFilter();  //清除  store.filter 內容
        otherCombo.getStore().filterBy(function (record) {//filterBy function , 若為 true ,則包含該選項     
                    var Tmp_isAdd = true;
                    if (record.get('value') == cur_value)
                        Tmp_isAdd = false;
                    //將 obj 轉成 Array             
var selectedValues_Ary = Object.keys(selectedValues).map((key) => [key, selectedValues[key]]);

                    for (i = 0; i < selectedValues_Ary.length; i++) {
                        if (record.get('value') == selectedValues[i])
                            Tmp_isAdd = false;
                    }
                    return Tmp_isAdd;
                });
                console.log(" selectedValues: ", selectedValues);
                console.log(" id: ", id);
                var Tmp_store = otherCombo.getStore();
                console.log(" otherCombo.getStore()- Tmp_store", Tmp_store);
            }
        });
    }; // end of onselection

    var onExpand= function (combo) {
        combo.getStore().clearFilter();
        var otherSelectedValues = ['s_filter1', 's_filter2', 's_filter3'].filter(otherId => otherId !== combo.id).map(otherId => selectedValues[otherId]);
        combo.getStore().filterBy(function (record) {
            return !otherSelectedValues.includes(record.get('value'));
        });
    }

    var cmp_filter1 = get_cmp_filter1("過濾條件1", "s_filter1", 80, 80, Tmp_Store);
    var cmp_filter2 = get_cmp_filter1("過濾條件2", "s_filter2", 80, 80, Tmp_Store);
    var cmp_filter3 = get_cmp_filter1("過濾條件3", "s_filter3", 80, 80, Tmp_Store);

    Ext.getCmp("s_filter1").on("select", onSelect);
    Ext.getCmp("s_filter2").on("select", onSelect);
    Ext.getCmp("s_filter3").on("select", onSelect);

    Ext.getCmp("s_filter1").on("expand", onExpand);
    Ext.getCmp("s_filter2").on("expand", onExpand);
    Ext.getCmp("s_filter3").on("expand", onExpand);






2>*.js
  //取得過濾欄位的過濾值
      //var Tmp_filter_Ary = ["s_filter1", "s_filter2", "s_filter3"];   //過濾欄位的元件名稱
     //var Tmp_filter_Name1 = selectedValues["s_filter1"];
     //if (!checkisnull(Tmp_filter_Name1)) {
     //    var Tmp_filter_Name1_val = nulltoStr(Ext.getCmp("s_filter1_val").getValue()).trim();
     //    Tmp_filter_Name1 = "s_" + Tmp_filter_Name1;
     //    np[Tmp_filter_Name1] = Tmp_filter_Name1_val;
     //}

     //取得過濾欄位的過濾值, 並傳入  np
     Tmp_filter_Ary.forEach(function (cur_filter) {
          var Tmp_filter_NM = selectedValues[cur_filter];
          if (!checkisnull(Tmp_filter_NM)) {
              var cur_filter_txt = cur_filter + "_val";
              var Tmp_filter_NM_val = nulltoStr(Ext.getCmp(cur_filter_txt).getValue()).trim();
              Tmp_filter_NM = "s_" + Tmp_filter_NM;
              np[Tmp_filter_NM] = Tmp_filter_NM_val;
          }
          }
          );

=> 箭頭函式(Arrow Function)- 以箭頭代表一函式運算式(Arrow Function Expression)

 箭頭函式(Arrow Function),但實際上他是箭頭函式運算式(Arrow Function Expression)指的是類似這樣的語法:

var arrow= key=> key*2

--> var arrow = function(key) {return key*2;}

const arrow = (param1, param2) => { 
  // do something awesome return param1+param2}--> arrow=function(param1,param2){ return param1+param2}
// 基本用法 
   const arrow1 = (param1, param2) => { ... } 

// 僅有一個參數時,可省略括號 
     const arrow2 = params => { ... } 

// 單一運算後直接回傳時,可省略大括號 
   const arrow3 = params => params ** 2

2024年8月21日 星期三

V80202I: 整機抽換紀錄匯出- 匯出, 套表 / V80202K: F16V_CHECK - 匯出, 不套表 - 簡單子畫面 - 顯示等待訊息

 目的: V80202I: 整機抽換紀錄匯出- 匯出XLS, 套表 

            V80202K: F16V_CHECK - 匯出XLS, 不套表(直接填寫報表標題)

處理說明: 1>匯出套表  - V80202I: 整機抽換紀錄匯出            (SS_FILES)
                  2>匯出不套表  -  V80202K: F16V_CHECK匯出     (直接寫XLS欄位標題)


一.套表 - 匯出 xls
1>*.js
// 專案別(PROJID)
    var cmp_sub_PROJID = get_cmp_txt1('專案別', 'sub_PROJID', 80, 110);
    var cmp_pick_sub_PROJID = get_pick_btn0('挑選專案別', 'sub_btn_PROJID',
        '../api/V80202IAPI/get_sub_PROJIDPick',
        ['PROJID'], ['sub_PROJID'], J_pickstore_sub_PROJID, J_pickcolumns_sub_PROJID);
    cmp_sub_PROJID.items.push(cmp_pick_sub_PROJID);

      var np = {};
      np["PROJID"] = Ext.getCmp("sub_PROJID").getValue();                        
      np["ACNO_"] = Ext.getCmp("sub_ACNO_").getValue();                                            

             Ext.getCmp('s_form').submit({      
                        url: '../../api/V80202IAPI/XlsOut',
                        method: 'POST',
                        async: false,
                        standardSubmit: true, //若要傳送檔案至前端, standardSubmit必需設為 true  
                        params: np,
                    });

                    //顯示結果訊息..
                    var mask = new Ext.LoadMask(Ext.getBody(), {
                        msg: '處理中,請稍待...'
                    });

                    mask.show();//使用 mask 需手動呼叫show() 方法下
                    //每1秒檢核一次,是否已完成, 若已完成,則不再檢核
                    var timer = setInterval(function () {
                        var r = r_cookies('EX_DFile');
                        //console.log("r_cookies=", r);
                        if (!checkisnull(r)) {
                            mysuccessalert(r);
                            clearInterval(timer);
                            mask.hide();
                            timer = null;
                        }
                    }, 1000);  //1000ms = 1sec
                }  // end of  function Call_V120602B() {

2>*.cs
// 1>將 SS_FILES.FBOLD 存成 Local檔案  - 因為需讀取 BODY , 所以需 conn , 透過 reader 讀取
            OracleConnection conn = new OracleConnection(DBService.ConnectionString(DBLINK));//
            OracleCommand cmd = new OracleCommand();
            conn.Open();
            conn.ClientInfo = User.Identity.Name;
            conn.ModuleName = BaseSYS + "_" + BaseMODID;
            conn.ActionName = ActionName;
            cmd.Connection = conn;
            string Tmp_Str = "";                        
            string Tmp_FName = "V80202_整機抽換紀錄_匯出格式.xlsx";      //套表的檔案名稱 , 
            //documentPath = c:\\inetpub\wwwroot\TLS5\TLSWEB_AMM5\document\
            string documentPath = HttpContext.Current.Server.MapPath("~") + "document\\";  // 取得實實的路徑            
            string pathFName = documentPath + Tmp_FName;
            //需要擷取大量資料時,DataReader 是很好的選擇,因為資料不會快取至記憶體。
            OracleDataReader reader;
            Workbook wk = null;
            MemoryStream mstream = new MemoryStream();
            string FileName = "V80202_整機抽換紀錄_匯出格式_" + Tmp_PROJID +"_"+Tmp_ACNO_+ ".xlsx";
            string FileName1 = documentPath + FileName;
            HttpCookie MyCookie;
            try
            {
                wk = new Workbook();
                //1>將  SS_FILES. FBODY , 存至Local目錄.檔案                 
                if (File.Exists(pathFName))
                {
                    File.Delete(pathFName);
                }
                Tmp_Sql = " SELECT  FNAME,FBODY "
                                + " FROM     SS_FILES   "
                                + "   WHERE   1 = 1  "
                                + "  AND         FNAME = " + myfunc.AA(Tmp_FName);
                cmd.CommandText = Tmp_Sql;
                reader = cmd.ExecuteReader();
                byte[] file = null;
                //FileMode.OpenOrCreate: 開啟檔案若無檔案則新增
                //FileAccess.ReadWrite: 允許檔案讀取/寫入
                FileStream fs = File.Open(pathFName, FileMode.OpenOrCreate, FileAccess.ReadWrite);
                BinaryWriter bw = new BinaryWriter(fs);
                if (reader.HasRows)
                {
                    if (reader.Read())
                    {
                        file = (byte[])reader["FBODY"];
                        //fs.Write(file,0,50000);
                        bw.Write(file);
                        wk.LoadFromStream(fs);
                        bw.Close();
                        fs.Close();
                    }
                }




二.不套表 - 匯出 xls
1>*.cs
     wk = new Workbook();
     Worksheet ws = wk.Worksheets[0];//獲取第一個工作表
      //共 6 欄, Card# Noum 區域 工單情況 工號 版本
      //不套表 , 匯出欄位標題
      string[] outFieldArray = { "Card #","Noum","區域", "工單情況", "工號", "版本",};
      for (int i = 0; i < outFieldArray.Length; i++)
       {
         ws.Range[myfunc.GetExcelPos(i, 0)].Text = outFieldArray[i];
       }

      DataTable dt = new DataTable();
      Tmp_Sql = "SELECT   PLANCARD,Noum,ACAREA,STAT,SAPNO,ED,ACNO  "
                               + "  FROM  "
                               +   :  ;   
      dt = myfunc.SqlOpen(dt, Tmp_Sql);
      Tmp_Cnt = dt.Rows.Count;
                //Tmp_Str = "已匯出完成!!  ("+Tmp_Cnt.ToString() +"筆) ";
      for (int i = 0; i < dt.Rows.Count; i++)
                {
                    //Card# Noum 區域 工單情況 工號 版本
                    //PLANCARD,NOUM,ACAREA ,STAT ,SAPNO,ED,ACNO
                    ws.Range[myfunc.GetExcelPos(0, i + 1)].Text = dt.Rows[i]["PLANCARD"].ToString();
                    ws.Range[myfunc.GetExcelPos(1, i + 1)].Text = dt.Rows[i]["NOUM"].ToString();
      


V80202L -[SAP單況比對]鈕 - switch case 用法 - 匯出畫面所有資料 -2Sheet

目的: V80202L - switch case 用法  - 匯出畫面所有資料

處理說明: 1> switch case
                  2> switch case:
                              if () {}  
                        --> 會錯誤  - 無法直接跳至下一 case 
                        --> 需改成  switch case  when    :
                              --> case when 有問題 -->改用 else  if 
                 3>                      




1>*.cs
/* get_ISSAME(Tmp_AMMSTS, Tmp_SAPSTAT);
* 1> AMMSTS=Z 且SAP狀態碼 in ('E0012','E0022','I0076') -->‘Y’
2>AMMSTS=I 且SAP單況(STAT) in ('I0012','I0046')--> ‘Y’
3>AMMSTS=H且SAP狀態碼 in ('I0045',I0046') --> ‘Y’
4>AMMSTS)<='C' 且 AMMSTS<'F'且SAP單況(STAT) not in ('E0012','E0022','I0076','I0012' ,'I0046','I0045')-->‘Y’
5>AMMSTS)<'C' --> null
6>其他情況 then ‘N’
*/

public static string get_ISSAME(string par_AMMSTS, string par_SAPSTAT)
{
string Tmp_RtnStr = "";
Tmp_RtnStr = "N";
switch (par_AMMSTS)
{
//5 > AMMSTS< 'C'-- > null
case "A":
case "B":
{
Tmp_RtnStr = "";
break;
}

//4 > AMMSTS)<= 'C' 且 AMMSTS<'F'且SAP單況(STAT) not in ('E0012', 'E0022', 'I0076', 'I0012', 'I0046', 'I0045')-- >‘Y’
case "C":
case "D" when ("E0012,E0022,I0076,I0012,I0046,I0045".IndexOf(par_SAPSTAT) > -1) :
{
       Tmp_RtnStr = "Y";
       break;
}
//3 > AMMSTS = H且SAP狀態碼 in ('I0045', I0046') --> ‘Y’
case "H" when ("I0045,I0046".IndexOf(par_SAPSTAT) > -1) :
Tmp_RtnStr = "Y";
break;

//2 > AMMSTS = I 且SAP單況(STAT) in ('I0012', 'I0046')-- > ‘Y’
case "I" when ("I0012,I0046".IndexOf(par_SAPSTAT) > -1) :
Tmp_RtnStr = "Y";
break;

//1 > AMMSTS = Z 且SAP狀態碼 in ('E0012', 'E0022', 'I0076')-- >‘Y’
case "Z" when ("E0012,E0022,I0076".IndexOf(par_SAPSTAT) > -1):
Tmp_RtnStr = "Y";
break;

default:
Tmp_RtnStr = "N";
break;

} //end of switch {}

return Tmp_RtnStr;



} //end of function get_ISSAME

2024年8月19日 星期一

V80202M –Finding處置匯入 –[挑選檔案]元件 –自訂畫面 –格式下載 - transaction - file - get_cmp_file1()

 目的: V80202M –Finding處置匯入  挑選檔案  自訂畫面 格式下載 - transaction

處理說明:   1>[挑選檔案]元件  - get_cmp_file1()
                        var cmp_SelFile = get_cmp_file1("sub_File");                                               
                    2>取得檔案名稱
                        Tmp_FName = Ext.getCmp("sub_File").getValue();                
                    3>後端讀取檔案內容
                        Stream Tmp_in_Stream = Request.Files[cur_FName].InputStream;     
                        wk.LoadFromStream(Tmp_in_Stream);
                        Worksheet sheet1 = wk.Worksheets[0];                
                        Tmp_SAPNO = sheet1.Range[myfunc.GetExcelPos(0, 0)].Value; 
                    4>取得 Cookie 的內容(後端傳回訊息)
                         Tmp_Str = "Finding處置匯入完成!!(" + Tmp_rowcnt.ToString() + "筆)<br>"
                                          + "匯入檔案名稱(" + Tmp_FName + ")";
                         MyCookie.Value = HttpUtility.UrlEncode(Tmp_Str);
                         HttpContext.Current.Response.Cookies.Add(MyCookie);
                         HttpContext.Current.Response.End(); 
    


1>*.js
   //1>> [挑選檔案]元件
   var cmp_SelFile = get_cmp_file1("sub_File");
// [工作中心報工匯出]鈕  - 子畫面欄位
    var J_formFields_Sub3 = [
        {
            bodyStyle: "background-color:transparent;", xtype: 'panel', border: 0, layout: { type: 'vbox', align: 'stretch' }, padding: "5", flex: 1,
            items: [cmp_SelFile,],
       },  // end of  檔案來源 2
                {  // space 空間                   
                    bodyStyle: "background-color:transparent;", xtype: 'panel', border: 0, layout: "vbox", padding: "0", flex: 1, width: 300, items: [],
                        }           
    ];  

//2>>取得 [檔案上傳].檔名
    var Tmp_FName = Ext.getCmp('sub_File').getValue();
    var np = {};
    np["sub_FName"] = Tmp_FName;

//3>>取得後端傳回值  []
var timer = setInterval(function () {
        var cookie_token = Ext.util.Cookies.get("Rtn_Msg");
        if (cookie_token != null) {
            clearInterval(timer);
            timer = null;
            //mask.hide();            
            var rtn_msg = r_cookies("Rtn_Msg");
            //mysuccessalert("[件號報工匯出]匯出完成");
            mysuccessalert(rtn_msg);
            me.up("window").close();
            me.up("window").destroy();
        }
    }, 2000);  //等待 2000ms =1se


2>*.cs  - 讀取前端檔案內容
      HttpRequest Request = HttpContext.Current.Request;
      var response = this.Request.CreateResponse();

1>>讀取前端檔案內容
foreach (string cur_FName in Request.Files)
{
    Stream Tmp_in_Stream = Request.Files[cur_FName].InputStream;
    wk = new Workbook();
    wk.LoadFromStream(Tmp_in_Stream);
    Worksheet sheet1 = wk.Worksheets[0];                
    Tmp_SAPNO = sheet1.Range[myfunc.GetExcelPos(0, 0)].Value; 


2>>transaction 
// Transaction SQL List - 存放  Transaction 的 SQL 
List<string> SQL_List_A = new List<string>();

Tmp_Sql = " UPDATE   AMM_SRO  "
                + "  SET          QDRWKTP=" + myfunc.AA(Tmp_QDRWKTP.Trim())
                + "  WHERE   SAPNO=" + myfunc.AA(Tmp_SAPNO.Trim());
SQL_List_A.Add(Tmp_Sql);

excuteSQLTran(SQL_List_A);


3>>設定 Cookie 內容
HttpCookie MyCookie = new HttpCookie("Rtn_Msg");
Tmp_Str = "Finding處置匯入完成!!(" + Tmp_rowcnt.ToString() + "筆)<br>"
                            + "匯入檔案名稱(" + Tmp_FName + ")";
MyCookie.Value = HttpUtility.UrlEncode(Tmp_Str);
HttpContext.Current.Response.Cookies.Add(MyCookie);
HttpContext.Current.Response.End();


4>[匯入格式下載]
 {
   xtype: 'button', text: '匯入格式下載', id: 'DnFileBtn_Sub3',
   listeners: {
   click: function () {
       document.location = "../api/VUTLAPI/dnloadSS_File?FNAME=V80202_Finding處置匯入格式.xlsx";    
                }
            }
        },

SQL- 無法連線- ORA-12638 證明資料擷取失敗

 目的: SQL- 無法連線  - SqlExplorer 無法連線  - Ora-12638

處理說明: 1> 將 sqlnet.ora 檔案內容
                        #SQLNET.AUTHENTICATION_SERVICES= (NTS)
                        --> SQLNET.AUTHENTICATION_SERVICES= (
NONE)
                  2>檔案目錄: C:\app\aidcadmin\product\11.2.0\client_2\network\admin\sqlnet.ora
                      必需以 admin 登入 windows , 才可以修改檔案內容


1>將 sqlnet.ora 檔案內容修改如下即可
       #SQLNET.AUTHENTICATION_SERVICES= (NTS)
       --> SQLNET.AUTHENTICATION_SERVICES= (
NONE)

2024年8月18日 星期日

V80202G- 切換資料 – grid.on(“selectionchanged”,function(){} ) – [備註]欄位排版 - 下方填滿

 目的: V80202G- 版別修改記錄查詢 – grid.on(“selectionchanged”,function(){}  ) – 顯示備註欄位值

處理說明:   1>Grid 資料切換時,
                         Ext.getCmp('sub_Grid').on("selectionchange", function (view, selections, options) {
                    2> [備註]欄位排版  - 下方佔滿
 {
                        xtype: 'panel', id: 'sub_panel3', region: 'south', layout: 'fit',
                        height: 60,
                        items: [
                            {
                                xtype: 'panel', id: 'sub_panel31', layout: { type: 'fit' },  border: 0,
                                items: [cmp_sub_REPLRMK],
                            },  // end of sub_panel11                            
                        ]  //end of sub_panel1.items,

                    },  // end of sub_panel1        
}



1>*.js

  1>>切換資料
  Ext.getCmp('sub_Grid').on("selectionchange", function (view, selections, options) {
        //var cur_recs = mysubstore.getSelectionModel().getSelection();
        var cur_recs=Ext.getCmp('sub_Grid').getSelectionModel().getSelection();
        if (cur_recs.length == 0)
            return;
        var cur_rec = cur_recs[0];
        var Tmp_REPLRMK = nulltoStr(cur_rec.data['REPLRMK']).toString();        
        Ext.getCmp("sub_REPLRMK").setValue(Tmp_REPLRMK);
    }
    );

2> [備註]欄位排版  - 下方佔滿
 var sub_V80202G_Flds = [
            {
                type: 'panel', bodyStyle: "background-color:transparent;", border: 5, padding: "1",
                layout: 'border',
                items: [
                    {
                        xtype: 'panel', id: 'sub_panel1', region: 'north', layout: 'hbox',
                        height: 30,
                        items: [
                            {
                                xtype: 'panel', id: 'sub_panel11', layout: { type: 'hbox', align: 'stretch' }, flex: 25, border: 0,
                                items: [cmp_sub_AMMNO, cmp_sub_SAPNO, cmp_sub_PN,],
                            },  // end of sub_panel11                            
                        ]  //end of sub_panel1.items,
                    },  // end of sub_panel1                        
                    {
                        xtype: 'panel',
                        id: 'sub_panel2',
                        region: 'center',
                        layout: 'fit',
                        //flex: 5,
                        border: 1,
                        items: [sub_Grid]
                    },
                    {
                        xtype: 'panel', id: 'sub_panel3', region: 'south', layout: 'fit',
                        height: 60,
                        items: [
                            {
                                xtype: 'panel', id: 'sub_panel31', layout: { type: 'fit' },  border: 0,
                                items: [cmp_sub_REPLRMK],
                            },  // end of sub_panel11                            
                        ]  //end of sub_panel1.items,
                    },  // end of sub_panel1        
                ] // end of   layout: "vbox", padding: "5", items: [
            }  //end of  sub_ShowPN_Flds , items[{
        ]      //end of  var sub_ShowPN_Flds