From 76430b83e28b43122886c1cd8a9fb1cd61040d22 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期一, 28 六月 2021 12:50:50 +0800 Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/zhengcaioa --- zhengcaioa/zhengcaioa/Views/SimCost/Index.cshtml | 152 ++++++++++++++++++++++---------------------------- 1 files changed, 68 insertions(+), 84 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Views/SimCost/Index.cshtml b/zhengcaioa/zhengcaioa/Views/SimCost/Index.cshtml index 72d4b9a..2e65b55 100644 --- a/zhengcaioa/zhengcaioa/Views/SimCost/Index.cshtml +++ b/zhengcaioa/zhengcaioa/Views/SimCost/Index.cshtml @@ -1,24 +1,77 @@ 锘緻{ - 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 }, @@ -27,80 +80,11 @@ { 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: '瑙i櫎缁戝畾鎿嶄綔纭', - content: '姝ゆ搷浣滃皢瑙i櫎鎵�閫夊畾鐢佃瘽鍗″拰浜哄憳缁戝畾鍏崇郴锛岀‘璁よ缁х画鍚�?', - 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> -} -- Gitblit v1.9.1