@{
|
ViewBag.Title = "电话费统计录入";
|
Layout = "~/Views/Shared/_Layout_Search.cshtml";
|
}
|
|
<link href="~/css/jquery-confirm.css" rel="stylesheet">
|
<link href="~/js/plugins/layer/laydate/theme/default/laydate.css" rel="stylesheet">
|
<script src="~/js/jquery-confirm.js" type="text/javascript"></script>
|
<script src="~/js/plugins/layer/laydate/laydate5.js" type="text/javascript"></script>
|
|
<style>
|
/* .laydate_table {
|
display: none;
|
}*/
|
|
.col-base {
|
line-height: 35px;
|
}
|
/*
|
#laydate_hms {
|
display: none !important;
|
}*/
|
</style>
|
|
@section headerStyle{
|
|
<table style="line-height:35px;margin-top:15px">
|
<tr>
|
<td width="100"></td>
|
<td>查询年份:</td>
|
<td width="180">
|
<input id="acTime" style="width:150px" class="layui-input" placeholder="yyyy" type="text" />
|
</td>
|
<td>电话卡号:</td>
|
<td width="180">
|
<input id="acSim" class="form-control" labtype="txt" addvisible="true" type="text">
|
</td>
|
<td>
|
<a class="btn btn-default btn-outline" href="#" onclick="doSearch()" style="margin-left:20px">
|
<i class="fa fa-search"></i> <span class="bold">查询</span>
|
</a>
|
</td>
|
<td></td>
|
</tr>
|
</table>
|
|
<script type="text/javascript">
|
|
gridConfig = { multiselect: false, selectcol: "sim_id" };
|
shrinkToFit = true;
|
footerrow = true;
|
|
dataCol = [
|
{ label: '序号', name: 'sim_id', labtype: 'txt', hidden: true },
|
{ label: '年份', name: 'bill_year', labtype: 'txt', hidden: false, width: 100 },
|
{
|
label: '电话卡号', name: 'sim', labtype: 'txt', hidden: false, width: 100,
|
formatter: function (cellvalue, options, rowObject) {
|
var simcode = rowObject.sim_id;
|
var url = "/SimCost/Index?year=" + rowObject.bill_year + "&sim=" + simcode;
|
return "<a onclick=\"OpenWindow('电话费','70%','50%','"+url+"' )\" >" + cellvalue + "</a>";
|
}
|
},
|
|
{
|
label: '1月', name: 'Jan', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter
|
},
|
{ label: '2月', name: 'Feb', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter },
|
{ label: '3月', name: 'Mar', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
|
{ label: '4月', name: 'Apr', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
|
{ label: '5月', name: 'May', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
|
{ label: '6月', name: 'Jun', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
|
{ label: '7月', name: 'Jul', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
|
{ label: '8月', name: 'Aug', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
|
{ label: '9月', name: 'Sept', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
|
{ label: '10月', name: 'Oct', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter},
|
{ label: '11月', name: 'Nov', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter },
|
{ label: '12月', name: 'Dece', labtype: 'txt', hidden: false, align: 'right', width: 100, formatter: currencyFmatter }
|
];
|
dataUrl = "/SimCost/GetSimYearList";
|
searchCol = [];
|
|
var lastsel;
|
|
$(function () {
|
|
laydate.render({
|
elem: '#acTime'
|
, type: 'year'
|
, value: getNowFormatDate()
|
});
|
|
//$("#jqGridPager").hide();//隐藏div
|
|
//$("#jqGrid").closest(".ui-jqgrid-bdiv").css({ 'overflow-x': 'scroll' });
|
|
//jQuery("#jqGrid").jqGrid('setGridHeight', 150);
|
|
});
|
|
|
function getNowFormatDate() {
|
var date = new Date();
|
var year = date.getFullYear();
|
return year;
|
}
|
|
function currencyFmatter(cellvalue, options, rowObject) {
|
var id = rowObject.sim_id;
|
var sim = rowObject.sim;
|
var m = options.pos - 3;
|
|
if (m > rowObject.month) {
|
var y = rowObject.bill_year;
|
var url = "/SimCost/Edit?id=" + id + "&money=" + cellvalue + "&year=" + y + "&month=" + m + "&sim=" + sim;
|
|
return "<a onclick=\"OpenWindow('电话费用录入','30%','50%','" + url + "')\">" + cellvalue + "</a>";
|
}
|
else {
|
return cellvalue;
|
}
|
}
|
|
function doSearch() {
|
|
|
// $("#jqGrid").trigger('reloadGrid');
|
$("#jqGrid").jqGrid('setGridParam', {
|
url: "/SimCost/GetSimYearList",
|
postData: {
|
searchtime: $('#acTime').val(),
|
searchsim: $('#acSim').val(),
|
}
|
|
}).trigger("reloadGrid");
|
|
}
|
|
|
</script>
|
|
}
|