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

182 lines
7.3 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@{
ViewBag.Title = "sqwzcgMessage";
}
@model dccdc.Models.sqjbycModel
@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));
$("#jbsj2").ligerDateEditor();
$("#fyly2").change(function () {
if ($("#fyly2").prop("checked") == false && $("#fydh").val()) {
$.ligerDialog.error("存在项目经费申请单,不能取消选择!");
$("#fyly2").prop("checked", true);
message(1);
return;
}
if ($("#fyly2").prop("checked") == true) {
message(1);
}
})
$("#je").blur(function () {
if ($("#je").val() >= 5000) {
message(2)
}
})
})
function message(type) {
var title = "";
var url = "";
if (type == 1) {
title = "项目经费申请内容";
url = "@Url.Action("sqMessage", "sq2")?type=@Request.QueryString["type"]&del=1&id=" + $("#fydh").val();
}
if (type == 2) {
title = "三重一大申请内容";
url = "@Url.Action("szyd_zjsysqMessage", "sq2")?type=@Request.QueryString["type"]&del=1&id=" + $("#fydh2").val();
}
openf2 = $.ligerDialog.open({
title: title,
url: url,
width: 720,
height: 330
});
}
//弹出框选中
function selectedData(type, sqdh, rowdatas) {
if (type == "xmjf")
$("#fydh").val(sqdh);
if (type == "szyd")
$("#fydh2").val(sqdh);
openf2.close();
}
function save() {
var id = $("#id").val();
var je = $("#je").val();
var bz = $("#bz").val();
var jbsj = $("#jbsj2").val();
var jbbz = $("#jbbz").val();
var jbrs = $("#jbrs").val();
var jbry = $("#jbry").val();
var fyly1 = $("#fyly1:checked").val();
var fyly2 = $("#fyly2:checked").val();
var fyly = "";
var fydh = $("#fydh").val();
var fydh2 = $("#fydh2").val();
if (!je) {
$.ligerDialog.error("请填写详细信息!")
return;
}
if (je >= 5000) {
if (fydh2 == "") {
$.ligerDialog.error("金额超过5000与三重一大添加不一致")
return;
}
}
else {
if (fydh2 != "") {
$.ligerDialog.error("金额超过5000与三重一大添加不一致")
return;
}
}
$.ajax({
url: "@Url.Action("savesqjbyc")", type: "post", dataType: "json", data: { id: id, je: je, fyly1: fyly1, fyly2: fyly2, fyly: fyly, fydh: fydh, fydh2: fydh2, bz: bz, jbsj: jbsj, jbbz: jbbz, jbrs: jbrs, jbry: jbry, items: "" },
success: function (d) {
$.ligerDialog.closeWaitting();
if (d.State == "0") {
$.ligerDialog.error("操作失败!");
}
else {
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>
@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.CheckBoxFor(m => m.fyly1)自有资金 &nbsp;&nbsp; @Html.CheckBoxFor(m => m.fyly2)项目经费
</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="150px">@Html.TextBoxFor(m => m.jbsj2, new { @class = "l-text" })</td>
<td class="ltd" width="70px">加班标准</td>
<td class="rtd" width="150px">@Html.TextBoxFor(m => m.jbbz, new { @class = "l-text l-text-field-number", @type = "number" })</td>
<td class="ltd" width="70px">加班人数</td>
<td class="rtd" width="150px">@Html.TextBoxFor(m => m.jbrs, new { @class = "l-text l-text-field-number", @type = "number" })</td>
</tr>
<tr>
<td class="ltd" width="70px">加班人员</td>
<td class="rtd" width="150px">@Html.TextBoxFor(m => m.jbry, new { @class = "l-text" })</td>
<td class="ltd" width="70px">加班理由</td>
<td class="rtd" width="150px">@Html.TextAreaFor(m => m.bz, new { cols = "18", 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 style="display:none;"></div>