| | |
| | | @{ |
| | | ViewBag.Title = "电话费录入"; |
| | | Layout = "~/Views/Shared/_Layout_Search.cshtml"; |
| | | ViewBag.Title = "电话费"; |
| | | Layout = null;// "~/Views/Shared/_Layout_Search.cshtml"; |
| | | } |
| | | |
| | | <link href="~/css/jquery-confirm.css" rel="stylesheet"> |
| | | <script src="~/js/jquery-confirm.js" type="text/javascript"></script> |
| | | <html> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> |
| | | <meta name="description" content=""> |
| | | <meta name="author" content="ThemeBucket"> |
| | | <title></title> |
| | | <link href="~/css/bootstrap.min.css" rel="stylesheet"> |
| | | <link href="~/css/plugins/jqgrid/ui.jqgrid.css?v=111111111" rel="stylesheet"> |
| | | <link href="~/css/animate.min.css" rel="stylesheet"> |
| | | <link href="~/css/style.min.css" rel="stylesheet"> |
| | | <script src="~/js/jquery.min.js"></script> |
| | | <script src="~/js/plugins/jqgrid/i18n/grid.locale-cn.js"></script> |
| | | <script src="~/js/plugins/jqgrid/jquery.jqGrid.min.js"></script> |
| | | </head> |
| | | <body style="width:100%;padding:10px"> |
| | | <table id="list2"></table> |
| | | @*<div id="pager2"></div>*@ |
| | | |
| | | @section headerStyle{ |
| | | <script type="text/javascript"> |
| | | |
| | | <script type="text/javascript"> |
| | | $(function () { |
| | | var year =@ViewBag.Year; |
| | | var sim ='@ViewBag.Sim'; |
| | | var urlstr = "/SimCost/GetList?year=" + year + "&sim=" + sim; |
| | | |
| | | gridConfig = { multiselect: false, selectcol: "id" }; |
| | | jQuery("#list2").jqGrid( |
| | | { |
| | | url: urlstr, |
| | | datatype: "json", |
| | | colModel: [ |
| | | { |
| | | label: '日期', name : 'bill_year', labtype: 'txt', hidden: false, width: 100, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | | return rowObject.bill_year + "-" + rowObject.bill_month; |
| | | } |
| | | }, |
| | | { |
| | | label: '电话卡号', name : 'simcard', labtype: 'txt', hidden: false, width: 150, |
| | | }, |
| | | { label: '使用人员', name : 'username', labtype: 'txt', hidden: false, width: 150 }, |
| | | { label: '电话单金额', name : 'bill_amount', labtype: 'txt', hidden: false, width: 150 }, |
| | | { label: '电话补贴金额', name : 'allow_amount', labtype: 'txt', hidden: false, width: 150 }, |
| | | { label: '差异金额', name : 'amount', labtype: 'txt', hidden: false, width: 100 }, |
| | | { label: '状态', name : 'statusChs', labtype: 'txt', hidden: false, width: 100 }, |
| | | { label: '更新日期', name: 'up_time', labtype: 'txt', hidden: false, width: 200}, |
| | | ], |
| | | shrinkToFit: true, |
| | | //rowNum: 10, |
| | | //rowList: [10, 20, 30], |
| | | //pager: '#pager2', |
| | | //sortname: 'id', |
| | | mtype: "post", |
| | | viewrecords: true, |
| | | }); |
| | | }); |
| | | |
| | | |
| | | |
| | | @*gridConfig = { multiselect: false, selectcol: "id" }; |
| | | dataCol = [ |
| | | { label: '序号', name: 'id', labtype: 'txt', hidden: false, width: 50 }, |
| | | { label: '账单日期', name: 'accountMonth', labtype: 'txt', hidden: false, width: 150 }, |
| | | { |
| | | label: '日期', name: 'bill_year', labtype: 'txt', hidden: false, width: 150, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | | return rowObject.bill_year + "-" + rowObject.bill_month; |
| | | }}, |
| | | { |
| | | label: '电话卡号', name: 'simcard', labtype: 'txt', hidden: false, width: 150, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | | return "<a onclick=\"OpenWindow('编辑电话费用','98%','90%', '/SimCost/Edit?id=" + rowObject.id + "')\" >" + cellvalue + "</a>"; |
| | | } |
| | | }, |
| | | { label: '使用人员', name: 'username', labtype: 'txt', hidden: false, width: 150 }, |
| | | { label: '电话单金额', name: 'bill_amount', labtype: 'txt', hidden: false, width: 100 }, |
| | |
| | | { label: '状态', name: 'statusChs', labtype: 'txt', hidden: false, width: 100 }, |
| | | { label: '更新日期', name: 'up_time', labtype: 'txt', hidden: false }, |
| | | ]; |
| | | dataUrl = "/SimCost/GetList"; |
| | | searchCol = [ |
| | | { label: '时间', name: 'searchtime', labtype: 'datearea', hidden: false }, |
| | | { label: '电话卡号', name: 'searchsim', labtype: 'txt', hidden: false, cwidth: '5%', cccwidth: '8%' } |
| | | ]; |
| | | dataUrl = "/SimCost/GetList?year=" +@ViewBag.Year+"&sim="+@ViewBag.Sim;*@ |
| | | |
| | | var _pageAdd = function () { |
| | | OpenWindow("新增电话费用", "98%", "90%", "/SimCost/Edit/"); |
| | | } |
| | | </script> |
| | | |
| | | var _pageUnBind = function () { |
| | | var db = jQuery('#jqGrid').jqGrid('getGridParam', 'selarrrow'); |
| | | if (db.length > 0) { |
| | | $.confirm({ |
| | | title: '解除绑定操作确认', |
| | | content: '此操作将解除所选定电话卡和人员绑定关系,确认要继续吗?', |
| | | type: 'green', |
| | | icon: 'glyphicon glyphicon-question-sign', |
| | | buttons: { |
| | | ok: { |
| | | text: '确认', |
| | | btnClass: 'btn-primary', |
| | | action: function () { |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "/Sim/UnBindSim?id="+db, |
| | | dataType: "json", |
| | | global: false, |
| | | success: function (data) { |
| | | </body> |
| | | </html> |
| | | |
| | | if (data.Result) { |
| | | jQuery('#jqGrid').jqGrid().trigger('reloadGrid'); |
| | | |
| | | parent.layer.msg('设置成功', { icon: 6 }); |
| | | } |
| | | else { |
| | | parent.layer.msg(data.Message, { icon: 5 }); |
| | | } |
| | | }, |
| | | error: function () { |
| | | parent.layer.msg('失败', { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | cancel: { |
| | | text: '取消', |
| | | btnClass: 'btn-primary' |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | else { |
| | | $.alert("请先选择需要解绑的电话卡!"); |
| | | } |
| | | |
| | | } |
| | | |
| | | var _afterSave = function (result) { |
| | | if (result) { |
| | | toastr.success("保存成功"); |
| | | } else { |
| | | toastr.error("保存失败"); |
| | | } |
| | | } |
| | | |
| | | var _afterDel = function (result) { |
| | | if (result) { |
| | | toastr.success("删除成功"); |
| | | } else { |
| | | /**/ |
| | | toastr.error("删除成功"); |
| | | /**/ |
| | | } |
| | | } |
| | | </script> |
| | | } |