2023年12月21日 星期四
V30701A –selectionchange 依目前資料.單況 控制按鈕 - Enabled/Disabled -datachange 時 - 按鈕.Enabled - selectionchange
V30701A - 訉息- mysuccessalert - myconfirmalert -mywarmalert – 按[確定]鈕後,再繼續往下執行(關閉子視窗)
目的: V30701A – 回覆訊息,按[確定]鈕後,再繼續往下執行(關閉子視窗 & 主畫面重新顯示)
Ext.getCmp("btn_Show").fireHandler();
Ext.getCmp("sub_V30702A_CancelBtn").fireHandler();
var Tmp_DataString = JSON.stringify(Tmp_DataAry);
var np = {};
np["sub_TASKNO"] = Ext.getCmp("sub_TASKNO").getValue();
np["sub_DataString"] = Tmp_DataString;
//np["DataAry_JSON"] = JSON.stringify(par_DataAry);
var Tmp_url = "../../api/V30702AAPI/INSERT_AMM_DSPHCARD"; //
var rtn_Str = getUrlStr(Tmp_url, np, "收單執行");
console.log("rtn_Str:", rtn_Str);
if (checkRtnOK(rtn_Str))
Ext.MessageBox.alert("訊息", rtn_Str, function () {
Ext.getCmp("btn_Show").fireHandler();
Ext.getCmp("sub_V30702A_CancelBtn").fireHandler();
})
2023年12月20日 星期三
V30702A/E – 子畫面 – Grid & Form & - 識別證刷卡
目的: V30702A – 子畫面 – 含 Grid & V30702E – 一般Form
var cmp_TAMAN_lbl = get_cmp_lbl0("(請刷識別證)", 130);
cmp_TAMAN_lbl.style = "font-size: 12pt; color: blue; ";
cmp_TAMAN_lbl.margin = "0 0 0 10";
1>*.jsExt.getCmp("sub_TAMAN").on('blur', function (me, eOpts) {
//STEP1 將[識別證卡號] 轉成 [員工編號]
var Tmp_CARDNO = me.getValue();
console.log("卡號:", Tmp_CARDNO);
var Tmp_EMPLYID = ""; //所有資料 PK 字串, 以 , 分隔
var Tmp_EMPLYNM = "";
var Tmp_url = "../../api/V30702AAPI/get_EMPLYID_EMPLYNM";
var np = {};
np["CARDNO"] = Tmp_CARDNO
var Tmp_Str = getUrlStr(Tmp_url, np, "識別證編號2員工編號");
Tmp_EMPLYID = StrExtract(Tmp_Str, 1);
Tmp_EMPLYNM = StrExtract(Tmp_Str, 2);
if (checkRtnOK(Tmp_EMPLYID)) {
me.setValue(Tmp_EMPLYID);
Ext.getCmp("sub_TAMAN_").setValue(Tmp_EMPLYNM);
}
if (Tmp_EMPLYID.length == 0)
return;
//STEP2 將[執行人員] [執行人員姓名 ]- 寫入 sub_Grid
var sub_Store_np = {
TAMAN: Tmp_EMPLYID,
TAMAN_: Tmp_EMPLYNM,
}
Ext.getCmp('sub_Grid').store.add(sub_Store_np);
Ext.getCmp("sub_TAMAN").setValue("");
Ext.getCmp("sub_TAMAN_").setValue("");
} // end of function(me,eOpts)
); // end of blur function)
2023年12月14日 星期四
V30702A - 由識別證卡號取得員工編號 - cardno
目的: V30702A - 由識別證卡號取得員工編號
2>下 SQL :
SELECT TOP 1 PSNNO
FROM SMS_AIDC.dbo.V_CARD
WHERE CARDNO=: 識別證卡號
var Tmp_Str = getUrlStr(Tmp_url, np, "識別證編號2員工編號");
SOAP(Simple Object Access Protocol) - WSDL(Web Service Define Language - XML)
A web service is a function that can be accessed by other programs over the web (Http).
To clarify a bit, when you create a website in PHP that outputs HTML its target is the browser and by extension the human being reading the page in the browser.
A web service is not targeted at humans but rather at other programs.
So your PHP site that generates a random integer could be a web service if it outputs the integer in a format that may be consumed by another program. It might be in an XML format or another format, as long as other programs can understand the output.
Wsdl is the interface and that's all you need. Good thing is that it is written in xml… so that we can achieve independence of defining data. All the languages have got APIs to read Xmls.(so that's the advantage of xml).
Now…the clients gets the wsdl and generates the stub code… this code is responsible for mediating the request response between server and client.
2023年12月12日 星期二
V30701A: 不出現子畫面,直接更新單況 - Update_STA
目的: V30701A: 不出現子畫面,直接更新單況
2>後端更新資料庫 *.cs
3>執行完成,顯示訊息 : 透過 Cookie , 不透過 sucessful
1>*.js
//按鈕 : [附檔資料] [批次新增][確認轉發工][下載匯入格式]
var Btn_Ary = [
{
xtype: 'button', text: '申請單送出', id: 'Btn_V30701A',
listeners: {
click: function (me,e,eOpts) {
console.log(" 1 申請單送出: ");
Call_V30701A();
}
}
},
];
//於單檔下方新增 Button
Ext.getCmp('grid_Single').insertBtn(Btn_Ary);
// 更新 - UDPATE_STAT , AMM_COMQ
[HttpPost]
public dynamic UPDATE_STA()
{
//取得參數值
var c = HttpContext.Current;
NameValueCollection nvc = c.Request.Form;
string Tmp_TASKNO = nvc["TASKNO"];
string Tmp_RtnMsg = "";
string n = funId + "_UPDATE_STA";
HttpCookie MyCookie;
try
{
var Tmp_Sql = " UPDATE AMM_DSPHCAR "
+ " SET STA='B' "
+ " WHERE TASKNO=" + myfunc.AA(Tmp_TASKNO);
myfunc.SqlExec(Tmp_Sql);
Tmp_RtnMsg = "派遣申請單號(" + Tmp_TASKNO + ").單況已設定為[B:待執行(派遣申請已送出)]!!";
MyCookie = new HttpCookie("EX_DFile", HttpUtility.UrlEncode(Tmp_RtnMsg));
HttpContext.Current.Response.Cookies.Add(MyCookie);
}
catch (Exception e)
{
Tmp_RtnMsg = myfunc.Get1ORA(e.Message);
Tmp_RtnMsg = "[申請單送出]失敗 !! <br>"
+ Tmp_RtnMsg;
MyCookie = new HttpCookie("EX_DFile", HttpUtility.UrlEncode(Tmp_RtnMsg));
HttpContext.Current.Response.Cookies.Add(MyCookie);
}
return Tmp_RtnMsg;
}
2023年12月7日 星期四
V80405B - Excel 插入長條圖 - 統計圖
目的: V80405B - Excel 插入長條圖
處理說明: 1>Worksheet ws2 = wk.Worksheets[2];//獲取第三個工作表 - 缺件統計圖表
2> Chart 設定
Chart chart = ws2.Charts.Add(ExcelChartType.ColumnClustered); chart.ChartTitle = "件號2缺件量統計表";
chart.DataRange = ws2.Range["A1:B4"];
chart.SeriesDataFromRange = false;