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

354 lines
15 KiB
Plaintext
Raw 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.sqgwjdModel
@section scripts{
<script type="text/javascript" src="@Url.Content("~/Scripts/public.js?v=1.02")"></script>
<script type="text/javascript">
var openf2;
$(function () {
$("#layout1").ligerLayout({ leftWidth: 300, topHeight: 130 });
$("#sqsj").ligerDateEditor({ format: "yyyy/MM/dd hh:mm:ss", showTime: true });
//$("#sqsj").ligerGetDateEditorManager().setValue(fun_date(0));
$("#jdsj2").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() >= 20000 && !$("#fydh2").val()) {
message(2)
}
})
$("#je").dblclick(function () {
if ($("#je").val() >= 20000) {
message(2)
}
})
})
function message(type) {
var title = "";
var url = "";
if (type == 1) {
title = "项目经费申请内容";
url = "@Url.Action("sqMessageNew", "sq2")?type=@Request.QueryString["type"]&del=1&id=" + $("#fydh").val();
}
if (type == 2) {
title = "三重一大申请内容";
url = "@Url.Action("szyd_zjsysqMessageNew", "sq2")?type=@Request.QueryString["type"]&del=1&id=" + $("#fydh2").val() + "&je=" + $("#je").val();
}
openf2 = $.ligerDialog.open({
title: title,
url: url,
width: 760,
height: 450
});
//window.open(url);
}
//弹出框选中
function selectedData(type, sqdh, rowdatas) {
if (type == "xmjf")
$("#fydh").val(sqdh);
if (type == "szyd")
$("#fydh2").val(sqdh);
if (openf2)
openf2.close();
}
function message2(type) {
openf2 = $.ligerDialog.open({
title: "选择已有项目经费",
url: "@Url.Action("sqjfcx2", "sq2")?type=@Request.QueryString["type"]&fydhs=" + $("#fydhs").val(),
width: 760,
height: 450
});
//window.open(url);
}
//弹出框选中
function selectedXZYYXMJF(fydhs) {
$("#fydhs").val(fydhs);
if (openf2)
openf2.close();
}
function save() {
var id = $("#id").val();
var je = $("#je").val();
var bz = $("#bz").val();
var jdsj = $("#jdsj2").val();
var ddry = $("#ddry").val();
var jdld = $("#jdld").val();
var sxrs = $("#sxrs").val();
var pcrs = $("#pcrs").val();
var lxdh = $("#lxdh").val();
var zrs = $("#zrs").val();
var ycbz = $("#ycbz").val();
var yjbz = $("#yjbz").val();
var qtbz = $("#qtbz").val();
var gzcbz = $("#gzcbz").val();
var gzcrs = $("#gzcrs").val();
var zsbz = $("#zsbz").val();
var zsrs = $("#zsrs").val();
var qt = $("#qt").val();
var jdbg = $("#jdbg").val();
var jcfj = $("#jcfj").val();
var fyly1 = $("#fyly1:checked").val();
var fyly2 = $("#fyly2:checked").val();
var fyly = "";
var fydh = $("#fydh").val();
var fydhs = $("#fydhs").val();
var fydh2 = $("#fydh2").val();
if (!yjbz)
yjbz = 0;
if (!qtbz)
qtbz = 0;
if (!gzcbz)
gzcbz = 0;
if (!zsbz)
zsbz = 0;
if (!je || !bz || !jdsj || !ycbz) {
$.ligerDialog.error("金额、接待理由、日期、用餐标准必填!")
return;
}
//if (!jdsj || compareNow(jdsj) == 1) {
// $.ligerDialog.error("日期不能小于当前时间!")
// return;
//}
if (je >= 20000) {
if (fydh2 == "") {
$.ligerDialog.error("金额超过20000与三重一大添加不一致")
return;
}
}
else {
if (fydh2 != "") {
$.ligerDialog.error("金额超过20000与三重一大添加不一致")
return;
}
}
if (fyly2) {
if (fydh == "") {
$.ligerDialog.error("勾选项目经费必须维护项目经费申请单!")
return;
}
}
else {
if (fydh != "") {
$.ligerDialog.error("维护项目经费申请单必须勾选项目经费!")
return;
}
}
if (filecount == 0) {
$.ligerDialog.error("附件必填!")
return;
}
$.ajax({
url: "@Url.Action("savesqgwjd")", type: "post", dataType: "json", data: { id: id, je: je, fyly1: fyly1, fyly2: fyly2, fyly: fyly, fydh: fydh, fydhs: fydhs, fydh2: fydh2, bz: bz, jdsj: jdsj, ddry: ddry, jdld: jdld, sxrs: sxrs, pcrs: pcrs, lxdh: lxdh, zrs: zrs, ycbz: ycbz, yjbz: yjbz, qtbz: qtbz, gzcbz: gzcbz, gzcrs: gzcrs, zsbz: zsbz, zsrs: zsrs, qt: qt, jdbg: jdbg, jcfj: jcfj, items: "" },
success: function (d) {
$.ligerDialog.closeWaitting();
if (d.State == "0") {
$.ligerDialog.error("操作失败!");
}
else {
$.ligerDialog.success("操作成功!");
parent.init();
//window.opener.init();
//window.opener = null;
//window.close();
}
},
beforeSend: function () {
$.ligerDialog.waitting("正在进行请稍后……");
}
});
}
//附件
function sqfile(show) {
var openf3 = $.ligerDialog.open({
url: "@Url.Action("sqfile")?show=" + show + "&type=" + encodeURIComponent("公务接待") + "&sqid=" + @Model.id,
title: "附件管理",
width: 700,
height: 300,
allowClose: false
});
}
//附件反馈 (必填)
var filecount = @ViewBag.filecount;
//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>
<style type="text/css">
.ltd {
background-color: white;
}
.t3 .ltd {
text-align: center;
}
.t2 tr td {
padding: 5px 0px 5px 10px;
line-height: 22px;
word-break: break-all;
}
.t3 tr td {
border: 1px solid #bebeff;
padding: 5px 0px 5px 10px;
line-height: 22px;
word-break: break-all;
}
</style>
}
<div class="l-clear"></div>
<div style="width:750px; margin:0 auto">
@Html.HiddenFor(m => m.id)
@Html.HiddenFor(m => m.fydh)
@Html.HiddenFor(m => m.fydhs)
@Html.HiddenFor(m => m.fydh2)
<h3 style="text-align:center;margin:10px 0 10px 0">德城区疾控中心公务接待申请单</h3>
<table class="t2" style="width:100%" border="0">
<tr style="display:none">
<td class="ltd" width="70px">申 请 人:</td>
<td class="rtd" width="150px">@Html.DisplayFor(m => m.sqr)</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", @disabled = "disabled" })</td>
<td class="ltd" width="70px">申请日期:</td>
<td class="rtd" width="150px">@Html.DisplayFor(m => m.sqsj)</td>
</tr>
<tr>
<td class="ltd" width="70px">申 请 人:</td>
<td class="rtd" width="150px">@Html.DisplayFor(m => m.sqr)</td>
<td class="ltd" width="70px"></td>
<td class="rtd" width="150px"></td>
<td class="ltd" width="70px"></td>
<td class="rtd" width="150px"><input type="@Request.QueryString["type"]" style="width:140px" readonly="readonly" value="选择已有项目经费" class="l-button" onclick="message2()" /></td>
</tr>
<tr>
<td class="ltd" width="70px">申请科室:</td>
<td class="rtd" width="150px">@Html.DisplayFor(m => m.ksmc)</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", onkeyup = @"value=value.replace(/[^\d.-]/g,'')" })*</td>
<td class="ltd" width="70px">费用来源:</td>
<td class="rtd" width="150px">@Html.CheckBoxFor(m => m.fyly1)自有资金 &nbsp;&nbsp; @Html.CheckBoxFor(m => m.fyly2)项目经费</td>
</tr>
</table>
<table class="t3" style="width:100%">
<tr>
<td class="ltd">接待理由</td>
<td class="rtd" colspan="2">@Html.TextAreaFor(m => m.bz, new { @rows = "2", @style = "width:90%" })*</td>
<td class="ltd">接待时间</td>
<td class="rtd" colspan="2">@Html.TextBoxFor(m => m.jdsj2, new { @class = "l-text" })</td>
</tr>
<tr>
<td class="ltd" width="80px">带队人员</td>
<td class="rtd" width="170px">@Html.TextBoxFor(m => m.ddry, new { @class = "l-text" })</td>
<td class="ltd" width="80px">随行人数</td>
<td class="rtd" width="170px">@Html.TextBoxFor(m => m.sxrs, new { @class = "l-text l-text-field-number", @type = "number", onkeyup = @"value=value.replace(/[^\d.-]/g,'')" })</td>
<td class="ltd" width="80px">联系电话</td>
<td class="rtd" width="170px">@Html.TextBoxFor(m => m.lxdh, new { @class = "l-text" })</td>
</tr>
<tr>
<td class="ltd">接待领导</td>
<td class="rtd">@Html.TextBoxFor(m => m.jdld, new { @class = "l-text" })</td>
<td class="ltd">陪餐人数</td>
<td class="rtd">@Html.TextBoxFor(m => m.pcrs, new { @class = "l-text l-text-field-number", @type = "number", onkeyup = @"value=value.replace(/[^\d.-]/g,'')" })</td>
<td class="ltd">总人数</td>
<td class="rtd">@Html.TextBoxFor(m => m.zrs, new { @class = "l-text l-text-field-number", @type = "number", onkeyup = @"value=value.replace(/[^\d.-]/g,'')" })</td>
</tr>
<tr>
<td class="ltd">用餐标准</td>
<td class="rtd">
@*@Html.TextBoxFor(m => m.ycbz, new { @class = "l-text l-text-field-number", @type = "number", onkeyup = @"value=value.replace(/[^\d.-]/g,'')" })*@
@Html.DropDownListFor(m => m.ycbz, ViewData["gwjdbzD"] as SelectList, "----请选择----", new { @class = "l-text" })*
</td>
<td class="ltd">用酒标准</td>
<td class="rtd">
@Html.TextBoxFor(m => m.yjbz, new { @class = "l-text l-text-field-number", @type = "number", onkeyup = @"value=value.replace(/[^\d.-]/g,'')" })
</td>
<td class="ltd">其他标准</td>
<td class="rtd">
@Html.TextBoxFor(m => m.qtbz, new { @class = "l-text l-text-field-number", @type = "number", onkeyup = @"value=value.replace(/[^\d.-]/g,'')" })
</td>
</tr>
<tr>
<td class="ltd" rowspan="2">工作餐</td>
<td class="ltd">标准</td>
<td class="rtd">
@Html.TextBoxFor(m => m.gzcbz, new { @class = "l-text l-text-field-number", @type = "number", onkeyup = @"value=value.replace(/[^\d.-]/g,'')" })
</td>
<td class="ltd" rowspan="2">住宿</td>
<td class="ltd">标准</td>
<td class="rtd">
@Html.TextBoxFor(m => m.zsbz, new { @class = "l-text l-text-field-number", @type = "number", onkeyup = @"value=value.replace(/[^\d.-]/g,'')" })
</td>
</tr>
<tr>
<td class="ltd">人数</td>
<td class="rtd">@Html.TextBoxFor(m => m.gzcrs, new { @class = "l-text l-text-field-number", @type = "number", onkeyup = @"value=value.replace(/[^\d.-]/g,'')" })</td>
<td class="ltd">人数</td>
<td class="rtd">@Html.TextBoxFor(m => m.zsrs, new { @class = "l-text l-text-field-number", @type = "number", onkeyup = @"value=value.replace(/[^\d.-]/g,'')" })</td>
</tr>
<tr>
<td class="ltd">其他</td>
<td class="rtd">@Html.TextBoxFor(m => m.qt, new { @class = "l-text" })</td>
<td class="ltd">接待宾馆</td>
<td class="rtd">@Html.TextBoxFor(m => m.jdbg, new { @class = "l-text" })</td>
<td class="ltd">就餐房间</td>
<td class="rtd">@Html.TextBoxFor(m => m.jcfj, new { @class = "l-text" })</td>
</tr>
</table>
<div style="text-align:center;margin-top:10px">
<a href="~/Content/fjsm.jpg" target="_blank">附件说明</a>
<input type="@Request.QueryString["type"]" readonly="readonly" value="附件管理*" class="l-button" onclick="sqfile('')" />
<input type="@Request.QueryString["type"]" readonly="readonly" value="申请" class="l-button" onclick="save()" />
</div>
</div>
<div style="display:none;"></div>