脚本网格日期控件自动保存
/*SM5613网格日期控件自动保存*/
1 function CalendarInputClick(gridId, rowIndex, columnName) { 2 var txt = event.target || event.srcElement; 3 var oldtext = txt.value; 4 var tdcolname = columnName; 5 var inputtext = ""; 6 var tablename = ""; 7 var callback = function (time) { 8 if (time != null) { 9 txt.value = time; 10 inputtext = time; 11 inputtext = inputtext.substr(0, 10); 12 GridCellChange(gridId, rowIndex, columnName); 13 tablename = "SM_CG_CGZB_TB"; 14 var thisParent = $(txt).parent(); 15 var id = thisParent.siblings("td[colname='ID']").text(); 16 var sql = "update {3} set {0}=to_date('{1}','yyyy-mm-dd') where ID={2}"; 17 sql = sql.format(tdcolname, inputtext, id, tablename, "铝件交期" + oldtext + "->" + inputtext); 18 $.ajaxEXEC(sql, function (data) { 19 if (data != 1) { 20 $("#lblMsg").text(data); 21 } 22 else { 23 $("#lblMsg").text("[铝件交期]修改成功:" + inputtext); 24 thisParent.parent().css({ "background-color": "LawnGreen" }); 25 } 26 }); 27 } 28 txt = null; 29 gridId = null; 30 rowIndex = null; 31 columnName = null; 32 }; 33 openWin('CalendarTime.aspx?showtime=true&time=' + txt.value, '', callback, { w: 300, h: 250 }); 34 }
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)