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

201 lines
8.8 KiB
Plaintext

@{
ViewBag.Title = "sqcgshMessage";
}
@model dccdc.Models.sqcgModel
@section scripts{
<script type="text/javascript" src="@Url.Content("~/Scripts/public.js")"></script>
<script type="text/javascript">
$(function () {
$("#layout1").ligerLayout({ leftWidth: 300, topHeight: 440 });
$("#sqsj").ligerDateEditor();
$("#sqsj").ligerGetDateEditorManager().setValue(fun_date(0));
$("#btSelect").click(function () {
liger.get("grid1").set("parms", { key: $("#jfmc").val(), key1: $("#jflb").val() });
liger.get("grid1").reload();
})
$("#jfmc").keydown(function (e) {
var curKey = e.which;
if (curKey == 13) {
liger.get("grid1").set("parms", { key: $("#jfmc").val(), key1: $("#jflb").val() });
liger.get("grid1").reload();
return false;
}
});
$("#grid2").ligerGrid({
height: "100%",
columns: [
{ display: "名称", name: "title", align: "left", width: 200, type: 'string', editor: { type: 'string' } },
{ display: "内容", name: "content", align: "left", width: 400, type: 'string', editor: { type: 'string' } },
{ display: "数量", name: "sl", align: "right", width: 60, type: 'float', editor: { type: 'float' } },
{ display: "金额", name: "je", align: "right", width: 60, type: 'float', editor: { type: 'float' } }
],
url: "@Url.Action("getxm4")?key=0000000&id=@Request.QueryString["id"]",
rownumber: true,
usePager: false
});
})
function save(ty) {
var id = $("#id").val();
var yj="";
switch(@ViewBag.zw)
{
case 1:yj = $("#spnr1").val();break;
case 2:yj = $("#spnr2").val();break;
case 3:yj = $("#spnr3").val();break;
case 4:yj = $("#spnr4").val();break;
}
if (!yj) {
$.ligerDialog.error("审批意见必填!")
return;
}
$.ajax({
url: "@Url.Action("savesqcgsh")", type: "post", dataType: "json", data: { id: id, yj: yj, ty: ty },
success: function (d) {
$.ligerDialog.closeWaitting();
if (d.Message == "false") {
$.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="center" title="明细">
<div id="grid2"></div>
</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, 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", @readonly = "readonly" })</td>
</tr>
<tr>
<td class="ltd" width="70px">费用来源</td>
<td class="rtd" width="150px">@Html.DropDownListFor(m => m.fyly, ViewBag.fylyD as SelectList, "----请选择----", new { @class = "l-text", @disabled = "disabled" })<br />@Html.TextBoxFor(m => m.fydh, new { @class = "l-text", @readonly = "readonly" })</td>
<td class="ltd" width="70px">备注</td>
<td class="rtd" width="150px">@Html.TextAreaFor(m => m.bz, new { cols = "18", rows = "3", @readonly = "readonly" })</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(1)" />
<input type="@Request.QueryString["type"]" value="驳回" style="height:50px" class="l-button" onclick="save(0)" />
</td>
</tr>
<tr>
<td class="ltd" width="70px">科室审批</td>
<td class="rtd" width="150px">@Html.DisplayTextFor(m => m.spr1)<br />@Html.DisplayTextFor(m => m.sptime1)</td>
<td class="ltd" width="70px">意见</td>
<td class="rtd" colspan="3" width="450px">
@if (ViewBag.zw == "1")
{
@Html.TextAreaFor(m => m.spnr1, new { cols = "60", rows = "3" })
}
else
{
@Html.TextAreaFor(m => m.spnr1, new { cols = "60", rows = "3", @readonly = "readonly" })
}
</td>
</tr>
<tr>
<td class="ltd" width="70px">分管审批</td>
<td class="rtd" width="150px">@Html.DisplayTextFor(m => m.spr2)<br />@Html.DisplayTextFor(m => m.sptime2)</td>
<td class="ltd" width="70px">意见</td>
<td class="rtd" colspan="3" width="450px">
@if (ViewBag.zw == "2")
{
@Html.TextAreaFor(m => m.spnr2, new { cols = "60", rows = "3" })
}
else
{
@Html.TextAreaFor(m => m.spnr2, new { cols = "60", rows = "3", @readonly = "readonly" })
}
</td>
</tr>
<tr>
<td class="ltd" width="70px">财务审批</td>
<td class="rtd" width="150px">@Html.DisplayTextFor(m => m.spr3)<br />@Html.DisplayTextFor(m => m.sptime3)</td>
<td class="ltd" width="70px">意见</td>
<td class="rtd" colspan="3" width="450px">
@if (ViewBag.zw == "3")
{
@Html.TextAreaFor(m => m.spnr3, new { cols = "60", rows = "3" })
}
else
{
@Html.TextAreaFor(m => m.spnr3, new { cols = "60", rows = "3", @readonly = "readonly" })
}
</td>
</tr>
<tr>
<td class="ltd" width="70px">中心审批</td>
<td class="rtd" width="150px">@Html.DisplayTextFor(m => m.spr4)<br />@Html.DisplayTextFor(m => m.sptime4)</td>
<td class="ltd" width="70px">意见</td>
<td class="rtd" colspan="3" width="450px">
@if (ViewBag.zw == "4")
{
@Html.TextAreaFor(m => m.spnr4, new { cols = "60", rows = "3" })
}
else
{
@Html.TextAreaFor(m => m.spnr4, new { cols = "60", rows = "3", @readonly = "readonly" })
}
</td>
</tr>
</table>
</div>
</div>