2026年2月28日 星期六

Blogger 無法讀取照片

 1》無法存取您的Google帳號



2》設定--〉App --> Chrome  --> [V]允許跨網站追蹤


2026年2月12日 星期四

V20108 – [匯出(人力資源)]鈕 – 設定 CELL 欄位邊框 - 水平置中/靠右

 目的: V20108 – [匯出(人力資源)] 設定 CELL 欄位邊框 & 水平靠右

處理說明: 1>設定欄位邊框
                      //cell.邊框 = 細線 & 黑色
                         CellRange cell = ws.Range[myfunc.GetExcelPos(k, cur_row)];
                         cell.Borders.LineStyle = LineStyleType.Thin;
                         cell.Borders.Color = Color.Black;
                     //cell.斜線 不顯示
                          cell.Borders[BordersLineType.DiagonalDown].LineStyle = LineStyleType.None; 
                          cell.Borders[BordersLineType.DiagonalUp].LineStyle = LineStyleType.None;
                 2>設定欄位右靠
                    ws.Range[myfunc.GetExcelPos(0, cur_row)].Text = "□";  //EMPID
ws.Range[myfunc.GetExcelPos(0, cur_row)].Style.HorizontalAlignment = HorizontalAlignType.Right;    //水平靠右  
HorizontalAlignType.Center;  //水平置中



1>*.cs

         ws.Range[myfunc.GetExcelPos(0, cur_row)].Text = "□";  //EMPID
ws.Range[myfunc.GetExcelPos(0, cur_row)].Style.HorizontalAlignment = HorizontalAlignType.Right;


  for (var k=0;k<=23;k++)
                        {
                            CellRange cell = ws.Range[myfunc.GetExcelPos(k, cur_row)];
                            cell.Borders.LineStyle = LineStyleType.Thin;
                            cell.Borders.Color = Color.Black;
                            cell.Borders[BordersLineType.DiagonalDown].LineStyle = LineStyleType.None; 
                            cell.Borders[BordersLineType.DiagonalUp].LineStyle = LineStyleType.None;
                        }                        


V20108 – 設定Panel的邊框寬度及顏色

 目的: V20108 – 設定Panel的邊框寬度及顏色

處理說明: 1>cmp_Panel_D12.border = true;
                      cmp_Panel_D12.style = {
                             // 邊框顏色 , // 邊框樣式 , // 邊框粗細
                             borderColor: 'red',
                             borderStyle: 'solid',
                             borderWidth: '2px'
                           };


1>*.js
      cmp_Panel_D12.border = true;
      cmp_Panel_D12.style = {
                              // 邊框顏色 , // 邊框樣式 , // 邊框粗細
                              borderColor: 'red',
                              borderStyle: 'solid',
                              borderWidth: '2px'
                        };

2026年1月21日 星期三

V20301 – 非TLS品項交修件建檔 1>[刪除]鈕 – 將勾選資料s刪除 - PK_LIST

 目的: V20301 – 非TLS品項交修件建檔  1>[刪除]鈕 – 將勾選資料s刪除  - PK_LIST

處理說明:1>[刪除]鈕 - Disable 原本Template.程式 - onclick
                     parent.onclick = function () { };  // 不使用 parent.onclick 
                 
                 2>刪除勾選資料 
                             var Tmp_DataAry1 = []; 
                    for (var i = 0; i < CHK_PK_OBJ.PK_LIST.length; i++) {
                         cur_rec = CHK_PK_OBJ.ALL_LIST[i];
                         Tmp_DataAry1.push(cur_rec);
                     }
                    let Tmp_DataString1 = JSON.stringify(Tmp_DataAry1);
                    var np = {};
                    np["DataString1"] = Tmp_DataString1;
                    Tmp_url = '../../api/V20301API/Delete_1';
                    Tmp_RtnStr = getUrlStr(Tmp_url, np, "刪除 勾選的[交修件單號] 資料");
                    if (!checkRtnOK(Tmp_RtnStr)) {
                        mywarnalert(Tmp_RtnStr);
                        return;
                    }
                    else
                        mysuccessalert(Tmp_RtnStr);

                 3>[刪除]鈕 - 刪除勾選資料s - 刪除後,移除畫面的勾選資料 
                      var toRemove = [];
                      Ext.getCmp('grid_Single').store.each(function (rec) {
                         if (rec.get('CHECK') == true)
                              toRemove.push(rec);
                            //gridstore.remove(rec); //畫面上隱藏刪除列  -->改成一次 remove all
                       });
                      gridstore.remove(toRemove); // remove all at once

1>*.js

Ext.getCmp("btn_del").on('click', function (me, e, eOpts) {
        parent.onclick = function () { };  // 
不使用 parent.onclick 
        //var cur_recs = Ext.getCmp('grid_Single').getSelectionModel().getSelection();
        var cur_recs = CHK_PK_OBJ.ALL_LIST;
        var cur_rec;        
        if (cur_recs.length == 0)
        {
            buttonModel.modelType = 0;
            mywarnalert('請先勾選要刪除的資料!!');
        }
        else {
            me.delMessage = "確定刪除勾選的資料嗎?";
            Ext.Msg.confirm('提醒', me.delMessage, callBackFunc);
            function callBackFunc(id) {
                if (id == 'yes') {
                    console.log("cur_recs.length:", cur_recs.length);
                    var gridstore = Ext.getCmp('grid_Single').store;
                    //刪除勾選.FMNO
                    var Tmp_DataAry1 = [];
                    for (var i = 0; i < CHK_PK_OBJ.PK_LIST.length; i++) {
                        cur_rec = CHK_PK_OBJ.ALL_LIST[i];
                        Tmp_DataAry1.push(cur_rec);
                    }
                    let Tmp_DataString1 = JSON.stringify(Tmp_DataAry1);
                    var np = {};
                    np["DataString1"] = Tmp_DataString1;
                    Tmp_url = '../../api/V20301API/Delete_1';
                    Tmp_RtnStr = getUrlStr(Tmp_url, np, "刪除 勾選的[交修件單號] 資料");

                    if (!checkRtnOK(Tmp_RtnStr)) {
                        mywarnalert(Tmp_RtnStr);
                        return;
                    }
                    else
                        mysuccessalert(Tmp_RtnStr);
                    //刪除後,移除畫面的勾選資料 
                    var toRemove = [];
                    Ext.getCmp('grid_Single').store.each(function (rec) {
                        if (rec.get('CHECK') == true)
                            toRemove.push(rec);
                            //gridstore.remove(rec); //畫面上隱藏刪除列  -->改成一次 remove all
                    });
                    gridstore.remove(toRemove); // remove all at once

                    Ext.getCmp('grid_Single').getView().refresh();
                    buttonModel.modelType = 0;
                }  // end    if (id == 'yes')             
    

2026年1月20日 星期二

V20201A – 子畫面Grid -無符合條件的資料 –onload

 目的: V20201A – 子畫面Grid -無符合條件的資料 –onload

處理說明: 1>Ext.getCmp('sub_Grid1').store.on("load", function (self, records, successful, operation, eOpts) {
           if ((successful) && (Ext.getCmp('sub_Grid1').store.data.getCount() == 0)) {
               mywarnalert("無符合條件的資料!!");
            }
           }); // end of Ext.getCmp('sub_Grid1').store.on("load", function () {

        -->進入子畫面,就觸發 onLoad event , 所以判斷先是否 successful ,


1>*.js

 Ext.getCmp('sub_Grid1').store.on("load", function (self, records, successful, operation, eOpts) {
            if ((successful) && (Ext.getCmp('sub_Grid1').store.data.getCount() == 0)) {
            mywarnalert("無符合條件的資料!!");
        }
    });  // end of Ext.getCmp('sub_Grid1').store.on("load", function () {

--> 一進入子畫面時, successful=false