474 lines
18 KiB
Plaintext
474 lines
18 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "sqjkshMessage";
|
|
}
|
|
|
|
@model dccdc.Models.sqwzcgbxModel
|
|
@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 () {
|
|
$("#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("正在进行请稍后……");
|
|
}
|
|
});
|
|
})
|
|
|
|
$("#grid2").ligerGrid({
|
|
height: "200px",
|
|
columns: [
|
|
//{ display: "经办人", name: "title", align: "left", width: 60, type: 'string', editor: { type: 'string' } },
|
|
{ display: "业务内容", name: "content", align: "left", width: 00, type: 'string', editor: { type: 'string' } },
|
|
{ display: "金额", name: "je", align: "right", width: 150, type: 'float', editor: { type: 'float' } }
|
|
],
|
|
url: "@Url.Action("getsqwzcgbxmx")?key=0000000&id=@Request.QueryString["id"]",
|
|
rownumber: true,
|
|
usePager: false
|
|
});
|
|
|
|
if ("@string.IsNullOrEmpty(Model.dydh)" == "False") {
|
|
var dydhs = "@Model.dydh".split(',');
|
|
var htmls = "";
|
|
for (var i in dydhs) {
|
|
htmls += "<a onclick='message(" + dydhs[i] + ")'>查看对应入库单:" + dydhs[i] + "</a> ";
|
|
}
|
|
document.getElementById("fydhShow").innerHTML = htmls
|
|
}
|
|
if ("@string.IsNullOrEmpty(Model.dydh2)" == "False") {
|
|
var dydh2s = "@Model.dydh2".split(',');
|
|
var htmls = "";
|
|
for (var i in dydh2s) {
|
|
htmls += "<a onclick='message2(" + dydh2s[i] + ")'>查看对应申请单:" + dydh2s[i] + "</a> ";
|
|
}
|
|
document.getElementById("fydhShow").innerHTML = htmls
|
|
}
|
|
})
|
|
function message(dydh) {
|
|
var title = "";
|
|
var url = "";
|
|
title = "关联入库单明细";
|
|
//url = "@Url.Action("sqwzcgMessage", "sq2")?type=hidden&id=" + dydh;
|
|
url = "@Url.Action("rkdMessage", "kc")?type=hidden&id=" + dydh;
|
|
|
|
openf2 = $.ligerDialog.open({
|
|
title: title,
|
|
url: url,
|
|
width: 720,
|
|
height: 460
|
|
});
|
|
}
|
|
function message2(dydh) {
|
|
var title = "";
|
|
var url = "";
|
|
title = "关联申请单明细";
|
|
url = "@Url.Action("sqwzcgMessage", "sq2")?type=hidden&id=" + dydh;
|
|
|
|
openf2 = $.ligerDialog.open({
|
|
title: title,
|
|
url: url,
|
|
width: 720,
|
|
height: 460
|
|
});
|
|
}
|
|
|
|
function save(ty) {
|
|
var id = $("#id").val();
|
|
var yj = "";
|
|
switch ("@ViewBag.zw") {
|
|
case "科室领导": yj = $("#spnr1").val(); break;
|
|
case "分管领导": yj = $("#spnr2").val(); break;
|
|
case "财务": yj = $("#spnr3").val();
|
|
if ("@ViewBag.cn".toLowerCase() == "true") {
|
|
$.ligerDialog.error("出纳不能审核!")
|
|
return;
|
|
}
|
|
break;
|
|
case "中心主任": yj = $("#spnr4").val();
|
|
if ($("#yzm1").val() != $("#yzm2").val()) {
|
|
$.ligerDialog.error("验证码错误或过期!")
|
|
return;
|
|
}
|
|
break;
|
|
}
|
|
if (yj == "") {
|
|
if (ty == "1") {
|
|
yj = "同意";
|
|
}
|
|
else {
|
|
yj = "不同意";
|
|
}
|
|
}
|
|
//财务 不同意跳过经费分解 直接可以不同意
|
|
if (!yj) {
|
|
if (ty == "0") {
|
|
yj = "不同意";
|
|
}
|
|
}
|
|
|
|
if (!yj) {
|
|
$.ligerDialog.error("审批意见必填!")
|
|
return;
|
|
}
|
|
if (nodownfilecount >= 1) {
|
|
$.ligerDialog.error("附件全部查看才能审核!")
|
|
return;
|
|
}
|
|
//隐藏按钮
|
|
$("#buttons").hide();
|
|
$.ajax({
|
|
url: "@Url.Action("savesqwzcgbxsh")", type: "post", dataType: "json", data: { id: id, yj: yj, ty: ty },
|
|
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();
|
|
|
|
});
|
|
}
|
|
|
|
}
|
|
//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 nodownfilecount = 1;
|
|
|
|
//弹出框选中
|
|
function selectedWZCG(rowdata) {
|
|
openf2.close();
|
|
}
|
|
|
|
//报销
|
|
function bx() {
|
|
@*openf2 = $.ligerDialog.open({
|
|
url: "@Url.Action("sqysbx")",
|
|
title: "项目经费分解",
|
|
width: 820,
|
|
height: 500
|
|
});*@
|
|
var id = $("#id").val();
|
|
openf2 = $.ligerDialog.open({
|
|
url: "@Url.Action("sqbxmx2")?type=qtbx&bxdid=" + id,
|
|
title: "项目经费分解",
|
|
width: 820,
|
|
height: 500
|
|
});
|
|
}
|
|
//报销查询
|
|
function bxck() {
|
|
var id = $("#id").val();
|
|
openf2 = $.ligerDialog.open({
|
|
url: "@Url.Action("sqysbxcxbybxdid2")?type=" + encodeURIComponent("物资采购报销") + "&bxdid=" + id,
|
|
title: "项目经费分解",
|
|
width: 760,
|
|
height: 500
|
|
});
|
|
}
|
|
//弹出框选中
|
|
function selectedYSBX(items) {
|
|
var id = $("#id").val();
|
|
|
|
@*$.ajax({
|
|
url: "@Url.Action("savesqwzcgbxbx")", type: "post", dataType: "json", data: { id: id, items: items },
|
|
success: function (d) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert(d.Message, function () {
|
|
if (d.State == 1) {
|
|
//当前页面刷新
|
|
location.reload()
|
|
return;
|
|
}
|
|
});
|
|
},
|
|
beforeSend: function () {
|
|
$.ligerDialog.waitting("正在进行请稍后……");
|
|
}
|
|
});*@
|
|
|
|
$.ajax({
|
|
url: "@Url.Action("savesqwzcgbxbx2")", type: "post", dataType: "json", data: { id: id, items: items },
|
|
success: function (d) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert(d.Message, function () {
|
|
if (d.State == 1) {
|
|
//当前页面刷新
|
|
location.reload()
|
|
return;
|
|
}
|
|
});
|
|
},
|
|
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>
|
|
<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:700px; margin:0 auto">
|
|
@Html.HiddenFor(m => m.id)
|
|
@Html.HiddenFor(m => m.fydh)
|
|
@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"></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", @readonly = "readonly" })</td>
|
|
<td class="ltd" width="70px"></td>
|
|
<td class="rtd" width="150px"></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd" width="70px">报销内容:</td>
|
|
<td class="rtd" colspan="5">@Html.TextAreaFor(m => m.bz, new { @rows = "2", @style = "width:90%", @readonly = "readonly" })</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div id="grid2"></div>
|
|
|
|
<table class="t1" style="width:100%">
|
|
<tr>
|
|
<td colspan="3" align="center" style="padding: 15px 0 15px 0">
|
|
<h4>审批过程 <mx id='fydhShow'></mx></h4>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd" width="77px">科室领导</td>
|
|
<td class="rtd">
|
|
@if (ViewBag.zw == "科室领导")
|
|
{
|
|
@Html.TextArea("spnr1", new { @cols = "77", @rows = "2" })
|
|
}
|
|
else
|
|
{
|
|
@Html.TextArea("spnr1", new { @cols = "77", @rows = "2", @readonly = "readonly", @disabled = "disabled" })
|
|
}
|
|
</td>
|
|
<td class="rtd">
|
|
@Html.DisplayTextFor(m => m.spr1) <br /> @Html.DisplayTextFor(m => m.sptime1)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd">分管领导</td>
|
|
<td class="rtd">
|
|
@if (ViewBag.zw == "分管领导")
|
|
{
|
|
@Html.TextArea("spnr2", new { @cols = "77", @rows = "2" })
|
|
}
|
|
else
|
|
{
|
|
@Html.TextArea("spnr2", new { @cols = "77", @rows = "2", @readonly = "readonly", @disabled = "disabled" })
|
|
}
|
|
</td>
|
|
<td class="rtd">
|
|
@Html.DisplayTextFor(m => m.spr2) <br /> @Html.DisplayTextFor(m => m.sptime2)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd">财务</td>
|
|
<td class="rtd">
|
|
@*@if (ViewBag.zw == "财务")
|
|
{
|
|
if (string.IsNullOrEmpty(Model.fydh) && string.IsNullOrEmpty(Model.fydhs))
|
|
{
|
|
@Html.TextArea("spnr3", new { @cols = "77", @rows = "2" })
|
|
}
|
|
else
|
|
{
|
|
if (!string.IsNullOrEmpty(Model.bxr))
|
|
{
|
|
@Html.TextArea("spnr3", new { @cols = "77", @rows = "2" })
|
|
}
|
|
else
|
|
{
|
|
<p><b>关联申请包含项目经费单必须先<a onclick="bx()">【项目经费分解】</a></b></p>
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
@Html.TextArea("spnr3", new { @cols = "77", @rows = "2", @readonly = "readonly", @disabled = "disabled" })
|
|
if (!string.IsNullOrEmpty(Model.fydh) || !string.IsNullOrEmpty(Model.fydhs) && !string.IsNullOrEmpty(Model.bxr))
|
|
{
|
|
<p><b><a onclick="bxck()">【项目经费分解查看】</a></b></p>
|
|
}
|
|
}*@
|
|
@if (ViewBag.zw == "财务")
|
|
{
|
|
|
|
if (!string.IsNullOrEmpty(Model.bxr))
|
|
{
|
|
<p><b><a onclick="bxck()">【项目经费分解查看】</a></b></p>
|
|
@Html.TextArea("spnr3", new { @cols = "77", @rows = "2" })
|
|
}
|
|
else
|
|
{
|
|
<p><b>关联申请包含项目经费单必须先<a onclick="bx()">【项目经费分解】</a></b></p>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
@Html.TextArea("spnr3", new { @cols = "77", @rows = "2", @readonly = "readonly", @disabled = "disabled" })
|
|
if (!string.IsNullOrEmpty(Model.bxr))
|
|
{
|
|
<p><b><a onclick="bxck()">【项目经费分解查看】</a></b></p>
|
|
}
|
|
}
|
|
</td>
|
|
<td class="rtd">
|
|
@Html.DisplayTextFor(m => m.spr3) <br /> @Html.DisplayTextFor(m => m.sptime3)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd">中心主任</td>
|
|
<td class="rtd">
|
|
@if (ViewBag.zw == "中心主任")
|
|
{
|
|
@Html.TextArea("spnr4", new { @cols = "77", @rows = "2" })
|
|
@Html.Hidden("yzm1", "");
|
|
@Html.TextBox("yzm2", "", new { @placeholder = "验证码" });
|
|
<input id="getcode" value="获取验证码" readonly class="l-button" style="width:120px" />
|
|
}
|
|
else
|
|
{
|
|
@Html.TextArea("spnr4", new { @cols = "77", @rows = "2", @readonly = "readonly", @disabled = "disabled" })
|
|
}
|
|
</td>
|
|
<td class="rtd">
|
|
@Html.DisplayTextFor(m => m.spr4) <br /> @Html.DisplayTextFor(m => m.sptime4)
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div style="text-align:center;margin-top:15px;margin-bottom:15px" id="buttons">
|
|
<a href="~/Content/fjsm.jpg" target="_blank">附件说明</a>
|
|
<input type="@Request.QueryString["type"]" readonly="readonly" value="附件管理*" class="l-button" onclick="sqfile('none')" />
|
|
<input type="@Request.QueryString["type"]" value="通过" readonly class="l-button" onclick="save(1)" />
|
|
<input type="@Request.QueryString["type"]" value="驳回" readonly class="l-button" onclick="save(0)" />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|