From 67a0042c5f29e4bb0e0b82f6190f2bc51480b45c Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期二, 28 二月 2023 13:25:09 +0800 Subject: [PATCH] 工资绩效改版 --- zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml | 45 +++++++++++++++++++++++++++++++++++++++------ 1 files changed, 39 insertions(+), 6 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml index 197060d..50f0504 100644 --- a/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml +++ b/zhengcaioa/zhengcaioa/Views/SalaryCheck/Edit.cshtml @@ -3,6 +3,8 @@ @using zhengcaioa.Models; @{ Layout = null; + + List<PageEntity> ActionInfo2 = ViewData["ActionInfo2"] as List<PageEntity>; } <!DOCTYPE html> @@ -84,16 +86,23 @@ <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-3 col-md-3 control-label">璧斿伩</label> <div class="col-sm-9 col-md-9"> - <input class="form-control" id="Peichang" name="Peichang" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.Peichang" oninput="if(value.length>10)value=value.slice(0,10)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> + <input class="form-control" id="Peichang" name="Peichang" labtype="txt" addvisible="true" editvisible="true" reg="" ismust="true" type="text" value="@Model.Peichang" oninput="if(value.length>10)value=value.slice(0,10)" onkeyup="CheckNum(this);"> </div> </div> <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-3 col-md-3 control-label">绾犻敊</label> <div class="col-sm-9 col-md-9"> - <input class="form-control" id="Jiucuo" name="Jiucuo" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Jiucuo" oninput="if(value.length>10)value=value.slice(0,10)" onkeyup="value=value.toString().match(/^\d+(?:\.\d{0,2})?/)"> + <input class="form-control" id="Jiucuo" name="Jiucuo" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Jiucuo" oninput="if(value.length>10)value=value.slice(0,10)" onkeyup="CheckNum(this);"> + </div> + </div> + <div class="clearfix layer-area" style="padding-bottom:15px;"> + <label class="text-right col-sm-3 col-md-3 control-label">棰勫彂宸ヨ祫鍚堣</label> + <div class="col-sm-9 col-md-9"> + <input class="form-control" id="Yufagongziheji" name="Yufagongziheji" labtype="txt" addvisible="true" maxlength="500" editvisible="true" reg="" ismust="true" type="text" value="@Model.Yufagongziheji" oninput="if(value.length>10)value=value.slice(0,10)" onkeyup="CheckNum(this);"> </div> </div> + </div> </div> </div> @@ -133,7 +142,7 @@ <a class="btn btn-success" href="javascript:void(0)" onclick="_pageAutoClose();" style="margin-left:4px; border-radius:4px;"> <i class="glyphicon glyphicon-remove"></i> <span class="bold">鍙栨秷</span> </a> - <a class="btn btn-success" href="javascript:void(0)" onclick="saveCheck();" style="margin-left:4px; border-radius:4px;"> + <a class="btn btn-success Update" href="javascript:void(0)" onclick="saveCheck();" style="margin-left:4px; border-radius:4px;display:none;"> <i class="glyphicon glyphicon-ok"></i> <span class="bold">鎻愪氦</span> </a> </div> @@ -150,7 +159,7 @@ else { $("#panelss").hide(); } - + }); var hh = document.body.clientHeight - $("#top").height() * 2 - 75; @@ -192,7 +201,7 @@ return; } - + $.ajax({ type: "POST", url: "/SalaryCheck/SaveCheck", @@ -203,7 +212,7 @@ if (data.Result) { parent.layer.msg('璁剧疆鎴愬姛', { icon: 6 }); - _pageAutoClose();//鑷姩鍏抽棴椤甸潰鏂规硶 + _pageAutoClose();//鑷姩鍏抽棴椤甸潰鏂规硶 } else { // toastr.error("澶辫触"); @@ -226,6 +235,30 @@ parent.layer.close(index); return false; } + + //鐢ㄦ埛鍙兘杈撳叆姝h礋鏁颁笌灏忔暟 + function CheckNum(obj) { + + if (isNaN(obj.value) && !/^-$/.test(obj.value)) { + obj.value = ""; + } + if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(obj.value)) { + obj.value = obj.value.replace(/\.\d{2,}$/, obj.value.substr(obj.value.indexOf('.'), 3)); + } + + } + + var ActionInfo22 = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ActionInfo2))'; + + + + $(function () { + var data = JSON.parse(ActionInfo22); + for (var o in data) { + $("." + data[o].PageShortcut).show(); + + } + }); </script> </body> </html> \ No newline at end of file -- Gitblit v1.9.1