101 lines
4.1 KiB
Plaintext
101 lines
4.1 KiB
Plaintext
|
||
@{
|
||
ViewBag.Title = "sqjkMessage";
|
||
}
|
||
|
||
@model dccdc.Models.sqjkModel
|
||
@section scripts{
|
||
<script type="text/javascript" src="@Url.Content("~/Scripts/public.js")"></script>
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
$("#layout1").ligerLayout({ leftWidth: 300, topHeight: 130 });
|
||
$("#sqsj").ligerDateEditor({ format: "yyyy/MM/dd hh:mm:ss", showTime: true });
|
||
//$("#sqsj").ligerGetDateEditorManager().setValue(fun_date(0));
|
||
})
|
||
|
||
function save() {
|
||
var id = $("#id").val();
|
||
var je = $("#je").val();
|
||
var bz = $("#bz").val();
|
||
console.log(je);
|
||
if (!je || !bz) {
|
||
$.ligerDialog.error("金额、备注必填!")
|
||
return;
|
||
}
|
||
if (parseInt(je) <= 0) {
|
||
$.ligerDialog.error("金额必须大于0!")
|
||
return;
|
||
}
|
||
|
||
$.ajax({
|
||
url: "@Url.Action("savesqjk")", type: "post", dataType: "json", data: { id: id, je: je, bz: bz },
|
||
success: function (d) {
|
||
$.ligerDialog.closeWaitting();
|
||
if (d.State == "0") {
|
||
$.ligerDialog.error("操作失败!");
|
||
}
|
||
else {
|
||
$.ligerDialog.success("操作成功!");
|
||
parent.init();
|
||
}
|
||
},
|
||
beforeSend: function () {
|
||
$.ligerDialog.waitting("正在进行请稍后……");
|
||
}
|
||
});
|
||
}
|
||
|
||
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 id="layout1">
|
||
<div position="top">
|
||
@Html.HiddenFor(m => m.id)
|
||
@Html.HiddenFor(m => m.fydh)
|
||
@Html.HiddenFor(m => m.fydh2)
|
||
<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.sqr, 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.sqdh, new { @class = "l-text", @readonly = "readonly" })</td>
|
||
<td class="ltd" width="70px">申请状态</td>
|
||
<td class="rtd" width="150px">@Html.DropDownListFor(m => m.zt, ViewBag.ztD as SelectList, "----请选择----", new { @class = "l-text", @disabled = "disabled" })</td>
|
||
<td class="ltd" width="70px">申请金额</td>
|
||
<td class="rtd" width="150px">@Html.TextBoxFor(m => m.je, new { @class = "l-text l-text-field-number", @type = "number" })*</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="ltd" width="70px">原因备注</td>
|
||
<td class="rtd" width="370px" colspan="3">@Html.TextAreaFor(m => m.bz, new { cols = "66", rows = "2" })*</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>
|
||
|
||
|
||
|
||
|