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

117 lines
4.2 KiB
Plaintext

@{
ViewBag.Title = "退费申请";
}
@section scripts{
<script type="text/javascript" src="@Url.Content("~/Scripts/public.js")"></script>
<script type="text/javascript">
var nowId = -1
$(function () {
$("#cx").click(function () {
liger.get("grid1").set("parms", { xm: $("#xm").val() });
liger.get("grid1").reload();
});
$("#btntf").click(function () {
if (nowId == -1) {
$.ligerDialog.error("请选择要退费的申请!");
return;
}
$.ajax({
url: "@Url.Action("saveTFSQ")", type: "post", dataType: "json", data: { id: nowId },
success: function (d) {
$.ligerDialog.success(d.Message);
nowId = -1
liger.get("grid1").reload();
liger.get("grid2").set("parms", { ymdjbid: -1 });
liger.get("grid2").reload();
}
});
});
$("#layout1").ligerLayout({ leftWidth: 360 });
$("#grid1").ligerGrid({
height: '100%',
columns: [
{ display: '疫苗登记编号', name: 'ymdjid', align: 'left', width: 100 },
{ display: '注射人姓名', name: 'name', align: 'left', width: 150 },
],
url: "@Url.Action("getTFDJ")",
pageSize: 30,
rownumbers: true,
usePager: false,
onDblClickRow: function (rowdata, rowid, rowobj) {
nowId = rowdata.id;
liger.get("grid2").set("parms", { ymdjbid: rowdata.id });
liger.get("grid2").reload();
}
});
$("#grid2").ligerGrid({
height: '100%',
columns: [
{ display: 'id', name: 'id', align: 'left', width: 40 },
{ display: '疫苗名称', name: 'ymmc', align: 'left', width: 150 },
{ display: '数量', name: 'ymsl', align: 'right', width: 100 },
{ display: '已注射数量', name: 'zssl', align: 'left', width: 100 },
],
url: "@Url.Action("getYMDJMX")",
parms: { ymdjbid: -1 },
pageSize: 30,
rownumbers: true,
usePager: false,
enabledEdit: true,
});
function sum() {
var rows = liger.get("grid2").getData();
var result = 0;
for (var i in rows) {
result += rows[i].fee * rows[i].sl;
}
$("#ysje").val(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;
}
var sfid;
});
</script>
}
<div class="l-clear"></div>
<div id="layout1">
<div position="left">
<table class="t1">
<tr>
<td class="ltd">姓名:</td>
<td><input id="xm" class="l-text" /></td>
<td><input type="button" id="cx" class="l-button" style="width:40px;height:25px" value="查询" /></td>
</tr>
</table>
<div id="grid1"></div>
</div>
<div position="center" title="疫苗登记明细">
<table class="t1" style="width: 100%">
<tr>
<td class="rtd">
<input type="button" id="btntf" value="退费" class="l-button" />
</td>
</tr>
</table>
<div id="grid2"></div>
</div>
</div>
<div style="display:none;"></div>