tijian_tieying/web/dccdc/Views/SanZhongYiDa/jbyc_sqMessage.cshtml
2025-02-20 12:14:39 +08:00

144 lines
5.5 KiB
Plaintext

@{
ViewBag.Title = "jbyc_sqMessage";
}
@model dccdc.Models.jbyc_sqModel
@section scripts{
<script type="text/javascript" src="@Url.Content("~/Scripts/public.js")"></script>
<script type="text/javascript">
$(function () {
$("#sqsj").ligerDateEditor();
$("#sqsj").ligerGetDateEditorManager().setValue(fun_date(0));
$("#jbrq").ligerDateEditor();
$("#jbrq").ligerGetDateEditorManager().setValue(fun_date(0));
})
function save() {
debugger;
var id = $("#id").val();
var rs = $("#rs").val();
var jbrq = $("#jbrq").val();
var jbsj = $("#jbsj").val();
var jbsy = $("#jbsy").val();
var bz = $("#bz").val();
var ycbz = $("#ycbz").val();
if (!rs) {
$.ligerDialog.error("请填写详细信息!")
return;
}
if (!jbrq) {
$.ligerDialog.error("请填写详细信息!")
return;
}
if (!jbsj) {
$.ligerDialog.error("请填写详细信息!")
return;
}
if (!jbsy) {
$.ligerDialog.error("请填写详细信息!")
return;
}
$.ajax({
url: "@Url.Action("savejbycsq")", type: "post", dataType: "json", data: { id: id, jbsy: jbsy, jbrq: jbrq, jbsj: jbsj, rs: rs, bz: bz,ycbz:ycbz},
success: function (d) {
$.ligerDialog.closeWaitting();
if (d.Message == "false") {
$.ligerDialog.error("操作失败!");
}
else {
$.ligerDialog.success("操作成功!");
parent.init();
}
},
beforeSend: function () {
$.ligerDialog.waitting("正在进行请稍后……");
}
});
}
//js对象深度克隆
var deepCopy = function (source) {
var result = {};
for (var key in source) {
result[key] = typeof source[key] === 'object' ? deepCopy(source[key]) : source[key];
}
return result;
}
function fun_date(days) {
var date1 = new Date(),
time1 = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate();//time1表示当前时间
var date2 = new Date(date1);
date2.setDate(date1.getDate() + days);
var y = date2.getFullYear();
var m = date2.getMonth() + 1;
m = m < 10 ? '0' + m : m;
var d = date2.getDate();
d = d < 10 ? ('0' + d) : d;
var time2 = y + "-" + m + "-" + d;
return time2;
}
</script>
}
<div class="l-clear"></div>
<div position="top">
@Html.HiddenFor(m => m.id)
<table class="t1" style="width:100%">
<tr>
<td class="ltd" width="70px">科室</td>
<td class="rtd" width="150px">@Html.TextBoxFor(m => m.ksmc, new { @class = "l-text", @readonly = "readonly" })</td>
<td class="ltd" width="70px">单号</td>
<td class="rtd" width="150px">@Html.TextBoxFor(m => m.sqdh, new { @class = "l-text", @readonly = "readonly" })</td>
<td class="ltd" width="70px">申请日期</td>
<td class="rtd" width="150px">@Html.TextBoxFor(m => m.sqsj, new { @class = "l-text", @readonly = "readonly" })</td>
</tr>
<tr>
<td class="ltd" width="70px">申请人</td>
<td class="rtd" width="150px">@Html.TextBoxFor(m => m.sqr, new { @class = "l-text", @readonly = "readonly" })</td>
<td class="ltd" width="70px">状态</td>
<td class="rtd" width="150px">@Html.DropDownListFor(m => m.zt, ViewData["ztD"] as SelectList, "----请选择----", new { @class = "l-text", @readonly = "readonly" })</td>
<td class="ltd" width="70px">加班人数</td>
<td class="rtd" width="150px">@Html.TextBoxFor(m => m.rs, new { @class = "l-text" })</td>
</tr>
<tr>
<td class="ltd" width="70px">加班日期</td>
<td class="rtd" width="150px">
@Html.TextBoxFor(m => m.jbrq, new { @class = "l-text" })
</td>
<td class="ltd" width="70px">加班时间</td>
<td class="rtd" width="150px">@Html.TextBoxFor(m => m.jbsj, new { @class = "l-text" })</td>
<td class="ltd" width="70px">备注</td>
<td class="rtd" width="150px">@Html.TextAreaFor(m => m.bz, new { @rows = "3" })</td>
</tr>
<tr>
<td class="ltd" width="70px">加班事由</td>
<td class="rtd" width="150px">@Html.TextAreaFor(m => m.jbsy, new { @rows = "3" })</td>
<td class="ltd" width="70px">用餐标准</td>
<td class="rtd" width="150px">@Html.TextAreaFor(m => m.ycbz, new { @rows = "3" })</td>
<td class="ltd" width="70px"></td>
<td class="rtd" width="150px"><input type="@Request.QueryString["type"]" value="申请" style="height:50px" class="l-button" onclick="save()" /></td>
</tr>
</table>
</div>
<div style="display:none;"></div>
<div class="dispReport">
<object classid="clsid:F6A015E2-092A-4006-93DA-4CBDE3AFF4B8" id="window.top.Formium.external.Print" width="300" height="50"></object>
</div>