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

302 lines
13 KiB
Plaintext

@{
ViewBag.Title = "sqysspMessage";
}
@model dccdc.Models.sqysModel
@section scripts{
<script type="text/javascript" src="@Url.Content("~/Scripts/public.js")"></script>
<script type="text/javascript">
var wait = 60;
function time(o) {
if (wait == 0) {
o.removeAttr("disabled");
o.val('获取验证码');
wait = 60;
} else {
o.attr("disabled", "disabled");
o.val(wait + "秒");
wait--;
setTimeout(function () {
time(o);
},
1000);
}
}
$(function () {
$("#layout1").ligerLayout({ leftWidth: 300, topHeight: 160, centerBottomHeight: 80 });
$("#layout2").ligerLayout({ rightWidth: 400 });
$("#sqsj").ligerDateEditor({ format: "yyyy/MM/dd hh:mm:ss", showTime: true });
//$("#sqsj").ligerGetDateEditorManager().setValue(fun_date(0));
$("#getcode").click(function () {
$.ajax({
url: "@Url.Action("getCode")", type: "post", dataType: "text", data: {},
success: function (d) {
$.ligerDialog.closeWaitting();
$("#yzm1").val(d);
//$("#yzm2").val(d);
time($("#getcode"));
},
beforeSend: function () {
$.ligerDialog.waitting("正在进行请稍后……");
}
});
})
$("#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: "jflbmc", align: "left", width: 100 },
//{ display: "经费名称", name: "jfmc", align: "left", width: 100 },
//{ display: "科目名称", name: "kmmc", align: "left", width: 100 },
{ display: "申请金额", name: "dj", align: "right", width: 60, type: 'float', editor: { type: 'float' } },
{ display: "测算依据", name: "csyj", align: "left", width: 100 },
{ display: "项目内容", name: "xmnr", align: "left", width: 100 },
{ display: "项目目标", name: "xmmb", align: "left", width: 100 }
],
url: "@Url.Action("getSqysMx")?key=0000000&id=@Request.QueryString["id"]",
rownumber: true,
usePager: false,
heightDiff: -50
});
})
function save(ty) {
if ("@ViewBag.zw" == "中心主任") {
if ($("#yzm1").val() != $("#yzm2").val()) {
$.ligerDialog.error("验证码错误或过期!")
return;
}
}
var id = $("#id").val();
var yj = $("#yj").val();
//var spjea = $("#jea").val();
//var spjeb = $("#jeb").val();
var spjea = 0;
var spjeb = 0;
if (yj == "") {
if (ty == "1") {
yj = "同意";
}
else {
yj = "不同意";
}
}
if (!yj) {
$.ligerDialog.error("审批意见必填!")
return;
}
//隐藏按钮
$("#buttons").hide();
$.ajax({
url: "@Url.Action("savesqyssp")", type: "post", dataType: "json", data: { id: id, yj: yj, ty: ty, spjea: spjea, spjeb: spjeb },
success: function (d) {
$.ligerDialog.closeWaitting();
if (d.State == 0) {
$.ligerDialog.error("操作失败!");
}
else {
if (parent.init) {
$.ligerDialog.success("操作成功!");
parent.init();
}
else {
if (window.opener.init) {
$.ligerDialog.success("操作成功!");
window.opener.init();
window.location.replace("success");
}
else{
$.ligerDialog.alert('操作成功!','提示','success',function(){
window.opener.document.location.reload();
window.opener=null;
window.open('','_self');
window.close();
});
}
}
}
},
beforeSend: function () {
$.ligerDialog.waitting("正在进行请稍后……");
}
});
}
//附件
function sqfile(show) {
var xmjfsrid = $("#xmjfsrid").val();
if (!xmjfsrid) {
$.ligerDialog.error("请先选择经费收入!");
return;
}
var openf3 = $.ligerDialog.open({
url: "@Url.Action("sqfile")?show=" + show + "&type=" + encodeURIComponent("经费收入") + "&sqid=" + xmjfsrid,
title: "附件管理",
width: 700,
height: 300,
allowClose: false
});
}
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="layout2">
<div position="center">
<div id="grid2"></div>
</div>
<div position="right" title="审批过程">
@if (!string.IsNullOrEmpty(Model.spr1))
{
<img src="@Url.Content("~/ligerUI/skins/icons/memeber.gif")" />
@Html.DisplayTextFor(m => m.spr1) <span>&nbsp;</span> @Html.DisplayTextFor(m => m.sptime1) <span>&nbsp;</span> @Html.DisplayTextFor(m => m.spnr1)<br />
}
@if (!string.IsNullOrEmpty(Model.spr2))
{
<img src="@Url.Content("~/ligerUI/skins/icons/memeber.gif")" />
@Html.DisplayTextFor(m => m.spr2) <span>&nbsp;</span> @Html.DisplayTextFor(m => m.sptime2) <span>&nbsp;</span> @Html.DisplayTextFor(m => m.spnr2)<br />
}
@if (!string.IsNullOrEmpty(Model.spr3))
{
<img src="@Url.Content("~/ligerUI/skins/icons/memeber.gif")" />
@Html.DisplayTextFor(m => m.spr3) <span>&nbsp;</span> @Html.DisplayTextFor(m => m.sptime3) <span>&nbsp;</span> @Html.DisplayTextFor(m => m.spnr3)<br />
}
@if (!string.IsNullOrEmpty(Model.spr4))
{
<img src="@Url.Content("~/ligerUI/skins/icons/memeber.gif")" />
@Html.DisplayTextFor(m => m.spr4) <span>&nbsp;</span> @Html.DisplayTextFor(m => m.sptime4) <span>&nbsp;</span> @Html.DisplayTextFor(m => m.spnr4)<br />
}
</div>
</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.sqr, new { @class = "l-text", @readonly = "readonly" })</td>
@*<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" })</td>*@
@*<td class="ltd" width="70px">申请日期</td>
<td class="rtd" width="150px">@Html.TextBoxFor(m => m.sqsj, new { @class = "l-text", @readonly = "readonly" })</td>*@
<td class="ltd" width="70px">预算年份</td>
<td class="rtd" width="150px">@Html.TextBoxFor(m => m.year, 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", @readonly = "readonly" })
@*<br />@Html.TextBoxFor(m => m.je2, new { @class = "l-text l-text-field-number", @type = "number", @readonly = "readonly" })*@
@Html.HiddenFor(m => m.je2)
</td>
</tr>
<tr>
<td class="ltd" width="70px">经费收入</td>
<td class="rtd" width="150px">
@Html.TextBoxFor(m => m.xmjfsrid, new { @class = "l-text", @readonly = "readonly", @style = "color:red" })
</td>
<td class="ltd" width="70px">收入附件</td>
<td class="rtd" width="150px">
<input readonly="readonly" value="附件查看" class="l-button" onclick="sqfile('none')" />
</td>
<td class="ltd" width="70px">收入金额</td>
<td class="rtd" width="150px">
@Html.TextBoxFor(m => m.xmjfsrje, 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.TextAreaFor(m => m.bz, new { rows = "2", @readonly = "readonly" })</td>
<td class="ltd" width="70px">测算依据</td>
<td class="rtd" width="150px">@Html.TextAreaFor(m => m.bz2, new { rows = "2", @readonly = "readonly" })</td>
<td class="ltd" width="70px"></td>
<td class="rtd" width="150px"></td>
</tr>
</table>
</div>
<div position="centerbottom">
<table class="t1" style="width:100%">
<tr>
@*<td class="ltd" width="70px">收入金额<br />支出金额</td>
<td class="rtd" width="150px">
@Html.TextBox("jea", "0", new { @class = "l-text l-text-field-number", @type = "number" })
<br />@Html.TextBox("jeb", "0", new { @class = "l-text l-text-field-number", @type = "number" })
</td>*@
<td class="ltd" width="70px">审批意见</td>
<td class="rtd" width="370px">
@Html.TextArea("yj", new { @cols = "60", @rows = "2" })
@if (ViewBag.zw == "中心主任")
{
@Html.Hidden("yzm1", "");
@Html.TextBox("yzm2", "", new { @placeholder = "验证码" });
<input id="getcode" value="获取验证码" readonly class="l-button" style="width:120px" />
}
</td>
<td class="ltd" width="70px"></td>
<td class="rtd" width="150px" id="buttons">
<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>
</table>
</div>
</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>