代码如下:

@using WebMap.Framework.UI;
@using WebMap.Admin.Models;
@using WebMap.Core;
@using WebMap.Core.Infrastructure;
@{
ViewBag.Title = "贷款申请管理"; var defaultSettins = EngineContext.Current.Resolve<WebMap.Domain.Common.AdminAreaSettings>(); }
@section HeadSection {
<link rel="stylesheet" href="/Content/v1/jquery-ui.css" />
<link rel="stylesheet" href="/Content/v1/ui.jqgrid.css" />
<link rel="stylesheet" href="/Content/v1/datepicker.css" />
<link rel="stylesheet" href="/Content/v1/bootstrap-timepicker.css" />
<link rel="stylesheet" href="/Content/v1/daterangepicker.css" />
<link rel="stylesheet" href="/Content/v1/bootstrap-datetimepicker.css" /> }
<script src="http://www.webmap.com/Scripts/jquery-1.10.2.min.js"></script>
<script src="http://www.webmap.com/Scripts/ws.base.js"></script>
<div class="breadcrumbs" id="breadcrumbs">
<script type="text/javascript">
try {
ace.settings.check('breadcrumbs', 'fixed');
} catch (e) {
} </script>
<ul class="breadcrumb">
<li>
<i class="ace-icon fa fa-home home-icon"></i>
<a href="/Admin/">首页</a>
</li>
<li class="active">贷款申请</li>
</ul><!-- /.breadcrumb -->
</div>
<div class="page-content">
<div class="row">
<div class="col-xs-12">
<div class="form-group"> <div class="col-xs-2">
<input type="text" placeholder="输入您的查询:名称" class="form-control search-query" name="Name">
</div>
<div class="col-xs-1 wizard-actions">
<button class="btn btn-purple btn-sm wizard-actions" type="button">
<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
查询
</button>
</div> </div>
<br />
<hr />
<table id="grid-table"></table>
<div id="grid-pager"></div>
<script type="text/javascript">
var $path_base = ".."; //in Ace demo this will be used for editurl parameter
</script>
</div>
</div>
</div>
<div id="load" style="width: 500px; height: 100px; position: absolute; top: 300px; left: 350px;"></div> @section FootSection { <script src="/Content/v1/js/date-time/bootstrap-datepicker.js"></script>
<script src="/Content/v1/js/date-time/bootstrap-timepicker.js"></script>
<script src="/Content/v1/js/date-time/moment.js"></script>
<script src="/Content/v1/js/date-time/daterangepicker.js"></script>
<script src="/Content/v1/js/date-time/bootstrap-datetimepicker.js"></script>
<script type="text/javascript">
// 审核
function AuditInfo(){
// 获取选中的id
$("#gbox_grid-table").find(":checkbox:checked").each(function(i){
var id = $(this).parent().parent().attr('id');
// 审核
$.ajax({
type: "POST",
url: "/Admin/BillLoanApply/AuditBillLoanApply",
data: "id="+id,
success: function(msg){
alert(msg);
}
});
}); // 刷新审核列表
location.reload();
}
function BillLoanDetails( id){
ws.base.showDialogNew("/Admin/BillLoanApplyDetail/List");
}
jQuery(function ($) { $(".wizard-actions :button").bind("click", function() {
var Name = $("input[name='Name']").val();
var postJson = {
PageSize: @(defaultSettins.DefaultGridPageSize),
CompanyName:Name,
}; jQuery("#grid-table").jqGrid('setGridParam', {
url: "/Admin/BillLoanApply/BillLoanApplyList",
postData: postJson,
ajaxGridOptions: { contentType: "application/json; charset=utf-8" },
serializeGridData: function(postData) {
return JSON.stringify(postData);
},
page: 1
}).trigger("reloadGrid");
//$("span .input-group-btn").addCss("popover-error"); }); }); </script>
<div style="position: absolute; top: 179px; left: 315px; z-index: 100;">
<button type="button" id="btnAudit" onclick="AuditInfo()"> 审核
</button>
</div>
@{
Html.RenderPartial("~/Administration/Views/Shared/_JqGridJsTemplate.cshtml", new JqGridModel()
{
Title = "贷款申请操作",
JqGridId = "grid-table",
Url = "/Admin/BillLoanApply/BillLoanApplyList",
ColNames = "[' ', '索引', '详细id','公司名称','公司电话','法人', '证件名称', '身份证号', '手机','借款期限','申请表复印件','状态','创建时间','申请人','申请日期','审核人','审核日期','详细']",
JsonReader = "{id: \"Id\",root: \"Data\",records: \"TotalRecords\",total: \"TotalPages\",repeatitems: false}",
ColModel = @"[
{
name: 'myac', index: '', width: 80, fixed: true, sortable: false, resize: false,subGrid: true,
formatter: 'actions',
formatoptions: {
keys: true,
delOptions: { recreateForm: true, beforeShowForm: beforeDeleteCallback },
delbutton:true
} },
{ name: 'Id', index: 'Id', width: 30, sorttype: 'int',editable:false,editoptions : {readonly : true,size : 10} },
{ name: 'DetailID', index: 'DetailID', width: 70,hidden:true,editable: false, editoptions: { size: '20', maxlength: '30' } },
{ name: 'CompanyName', index: 'CompanyName', width: 70, editable: true, editoptions: { size: '20', maxlength: '30' } },
{ name: 'CompanyPhone', index: 'CompanyPhone', width: 70,hidden:true, editable: true, editoptions: { size: '20', maxlength: '30' } },
{ name: 'Corporate', index: 'Corporate', width: 70,hidden:true,editable: true, editoptions: { size: '20', maxlength: '30' } },
{ name: 'CardName', index: 'CardName', width: 70,editable: true, editoptions: { size: '20', maxlength: '30' } },
{ name: 'CardId', index: 'CardId', width: 70,hidden:true,editable: true, editoptions: { size: '20', maxlength: '30' } },
{ name: 'Mobile', index: 'Mobile', width: 70,editable: true, editoptions: { size: '20', maxlength: '30' } },
{ name: 'LoanPeriod', index: 'LoanPeriod', width: 70,editable: true, editoptions: { size: '20', maxlength: '30' } , unformat: pickDate},
{ name: 'ApplicationCopy', index: 'ApplicationCopy', width: 70,hidden:true,editable: true, editoptions: { size: '20', maxlength: '30' } },
{ name: 'NStatus', index: 'NStatus', width: 50,editable: true,edittype:'select', editoptions: {value:'" + ViewBag.Dic + @"'} },
{ name: 'Createtime', index: 'Createtime',hidden:true, width: 70,editable: true, editoptions: { size: '20', maxlength: '30' }, unformat: pickDate },
{ name: 'Applicant', index: 'Applicant', width: 70,editable: true, editoptions: { size: '20', maxlength: '30' } },
{ name: 'ApplicationDate', index: 'ApplicationDate', width: 90,editable: true,formatter: dataformatter, editoptions: { size: '20', maxlength: '30' }, unformat: pickDate },
{ name: 'Auditor', index: 'Auditor', width: 70,formatter: dataformatter,editable: false, editoptions: { size: '20', maxlength: '30' }, unformat: pickDate },
{ name: 'AuditDate', index: 'AuditDate',hidden:true, width: 90,formatter: dataformatter, editable: true, editoptions: { size: '20', maxlength: '30' }, unformat: pickDate },
{ name: 'Id', index: 'Id', width: 150, formatter: formatModel,edittype:'custom'} ]",
PrmNames = "{page: \"page\",rows: \"PageSize\",sort: \"sidx\",order: \"sord\",search: \"_search\",nd: \"nd\",id: \"id\",oper: \"oper\",editoper: \"edit\",addoper: \"add\",deloper: \"del\",subgridid: \"id\",npage: null,totalrows: \"totalrows\"}",
UpdateUrl = "/Admin/BillLoanApply/Operation",
SubGrid = "true",
PageSize = defaultSettins.DefaultGridPageSize,
RowList = defaultSettins.GridPageSizes,
NavGridString = @"{
edit: true,
editicon: 'ace-icon fa fa-pencil blue',
add: true,
addicon: 'ace-icon fa fa-plus-circle purple',
del: true,
delicon: 'ace-icon fa fa-trash-o red',
search: false,
searchicon: 'ace-icon fa fa-search-plus grey',
refresh: false,
view: true,
viewicon: 'ace-icon fa fa-search-plus grey', },
{
//edit record form
//closeAfterEdit: true,
width: 400,
recreateForm: true,
beforeShowForm: function(e) {
var form = $(e[0]);
form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class=""widget-header"" />');
styleEditForm(form);
}
},
{
//new record form
width: 400,
closeAfterAdd: true,
recreateForm: true,
viewPagerButtons: false,
beforeShowForm: function(e) {
var form = $(e[0]);
form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar')
.wrapInner('<div class=""widget-header"" />')
styleEditForm(form);
}
},
{
//delete record form
recreateForm: true,
beforeShowForm: function(e) {
deleteCssHandle(e);
},
onClick: function(e) {
}
},
{
//search form
recreateForm: true,
afterShowSearch: function(e) {
var form = $(e[0]);
form.closest('.ui-jqdialog').find('.ui-jqdialog-title').wrap('<div class=""widget-header"" />')
style_search_form(form);
},
afterRedraw: function() {
style_search_filters($(this));
},
multipleSearch: true,
/**
multipleGroup:true,
showQuery: true
*/
},
{
//view record form
recreateForm: true,
beforeShowForm: function(e) {
var form = $(e[0]);
form.closest('.ui-jqdialog').find('.ui-jqdialog-title').wrap('<div class=""widget-header"" />')
}
}",
ExtensionJavaScript = @"
function showChildGrid(parentRowID, parentRowKey) {
$.ajax({
url: ""GetApplyDetail"",
type: ""POST"",
data: { id: 5 },
success: function(jsondata) {
if (jsondata) {
var childDiv = $(""<div class='widget-main'></div>"").appendTo(""#"" + parentRowID);
$.each(jsondata, function(i, j) {
childDiv.append(""<div class=\""col-xs-12 col-lg-2\""><span class='lighter line-height-125'>""+i+""<\/span>:<span class='text-primary'>"" + j+""</span><\/div>"");
});
}
}
});
}
function formatModel(cellValue, options, rowObject) {
var imageHtml = ""<input type='button' value='查看贷款申请详细' onclick='BillLoanDetails(""+cellValue + "");' />"";
return imageHtml;
} function styleEditForm(form) {
var buttons = form.next().find('.EditButton .fm-button');
buttons.addClass('btn btn-sm').find('[class*=""-icon""]').hide();//ui-icon, s-icon
buttons.eq(0).addClass('btn-primary').prepend('<i class=""ace-icon fa fa-check""></i>');
buttons.eq(1).prepend('<i class=""ace-icon fa fa-times""></i>'); form.find('input[name=ApplicationDate]').datetimepicker({
format: 'YYYY-MM-DD HH:mm:ss'
}).next().on(ace.click_event, function () {
$(this).prev().focus();
});
form.find('input[name=LoanPeriod]').datetimepicker({
format: 'YYYY-MM-DD HH:mm:ss'
}).next().on(ace.click_event, function () {
$(this).prev().focus();
}); buttons = form.next().find('.navButton a');
buttons.find('.ui-icon').hide();
buttons.eq(0).append('<i class=""ace-icon fa fa-chevron-left""></i>');
buttons.eq(1).append('<i class=""ace-icon fa fa-chevron-right""></i>');
}
function style_delete_form(form) {
var buttons = form.next().find('.EditButton .fm-button');
buttons.addClass('btn btn-sm btn-white btn-round').find('[class*=""-icon""]').hide();//ui-icon, s-icon
buttons.eq(0).addClass('btn-danger').prepend('<i class=""ace-icon fa fa-trash-o""></i>');
buttons.eq(1).addClass('btn-default').prepend('<i class=""ace-icon fa fa-times""></i>')
}
function beforeDeleteCallback(e) {
deleteCssHandle(e);
}
function deleteCssHandle(e) {
var form = $(e[0]);
if (form.data('styled')) return false; form.closest('.ui-jqdialog').find('.ui-jqdialog-titlebar').wrapInner('<div class=""widget-header"" />')
style_delete_form(form); form.data('styled', true);
}" }); } }

jqGrid添加详细按钮,单击弹出窗体的更多相关文章

  1. Android初级教程以动画的形式弹出窗体

    这一篇集合动画知识和弹出窗体知识,综合起来以动画的形式弹出窗体. 动画的知识前几篇已经做过详细的介绍,可翻阅前面写的有关动画博文.先简单介绍一下弹出窗体效果的方法: 首先,需要窗体的实例:PopupW ...

  2. IOS第二天-新浪微博 - 添加搜索框,弹出下拉菜单 ,代理的使用 ,HWTabBar.h(自定义TabBar)

    ********HWDiscoverViewController.m(发现) - (void)viewDidLoad { [super viewDidLoad]; // 创建搜索框对象 HWSearc ...

  3. iframe弹出窗体丢失焦点的问题

    好像在不同的浏览器都有这个现象,用javascript弹出一个iframe的窗口,第一次input的焦点是正常的, 然后弹出第二次的时候,选择,按钮都可以获取到,但是input无法获得焦点,而且页面不 ...

  4. MVVM模式下弹出窗体

    原地址:http://www.cnblogs.com/yk250/p/5773425.html 在mvvm模式下弹出窗体,有使用接口模式传入参数new一个对象的,还有的是继承于一个window,然后在 ...

  5. gridView AspNetPager 翻页时 弹出窗体关闭报错

    gridView AspNetPager 翻页后,你右击刷新或F5会发现弹出一个刷新页面. 这是因为默认翻页都是用dopostback方式回发的.因为这时的页面已经不是原来的页面.所以会弹出提示. 这 ...

  6. Bootstrap datepicker 在弹出窗体modal中不工作

    解决办法 在 show 方法后面 添加 下面一段代码 $('#modalCard').modal('show');—例子 打开 弹出窗体 //$('#modalCard').modal('hide') ...

  7. 转(C# 类似右键菜单弹出窗体)

    文章来自 https://www.cnblogs.com/ahdung/p/FloatLayerBase.html 每天进步一点点 新建类  FloatLayerBase 继承Form, 自己有点小改 ...

  8. 尝试用React写几个通用组件 - 带搜索功能的下拉列表,开关切换按钮,弹出框

    尝试用React写几个通用组件 - 带搜索功能的下拉列表,开关切换按钮,弹出框 近期正在逐步摸索学习React的用法,尝试着写几个通用型的组件,整体项目还是根据webpack+react+css-me ...

  9. WPF 左键单击弹出菜单 ContextMenu

    原文:WPF 左键单击弹出菜单 ContextMenu WPF中的ContextMenu在XAML中可直接做出来,但是仅限于右键弹出菜单,如果需要添加左键弹出功能,只需要在事件中添加Click事件 X ...

随机推荐

  1. pcduino连接OTG登录远程桌面

    由于没有HDMI的显示屏,为了方便起见,使用了pcduino的OTG来连接到虚拟桌面,可是发现连接上虚拟桌面后,电脑的外网就断了.下面这个方法让你既可以连接到pcduino,又可以让电脑能上外网. 打 ...

  2. PlayerPrefs类

    该类用于本地持久化保存与读取数据工作原理是:以键值对的形势将数据保存在文件中.该类可以保存与读取3种基本的数据类型,它们是浮点型.整型和字符串型,涉及的方法如下.SetFloat():保存浮点类型Se ...

  3. testNg官方文档

    官方文档:http://testng.org/doc/documentation-main.html

  4. vbox安装mac os x

    http://zhiwei.li/text/2013/12/%E5%9C%A8virtualbox4-3-4%E4%B8%AD%E5%AE%89%E8%A3%85mavericks/ http://g ...

  5. js深入研究之自定义混合Mixin函数

    <script type="text/javascript"> /* 增加函数 */ function augment(receivingClass, givingCl ...

  6. 转:Android模拟器连接电脑网络

    原文地址:http://www.it165.net/pro/html/201212/4444.html 第一步: 在命令行(就是开始——运行——输入cmd)模式下输入adb shell命令一般会报两种 ...

  7. Linux企业级项目实践之网络爬虫(12)——处理HTTP应答头

    Web服务器的HTTP应答一般由以下几项构成:一个状态行,一个或多个应答头,一个空行,内容文档.设置HTTP应答头往往和设置状态行中的状态代码结合起来.例如,有好几个表示"文档位置已经改变& ...

  8. apache2 httpd 基于域名的虚拟主机配置 for centos6X 和debian-8

    全系统虚拟主机: for debian 系统的apache2 域名 虚拟主机

  9. 深入了解Json转变为map的思想,附源代码2

    最近在做一个投票情况的用例,返回的结果打算放到JSON中 数据库的结果集如上图所示:optionkey代表选项,optionval代表其值 第一次做的时候考虑应该键值对应的关系,所以前台接到的json ...

  10. PHP基础设计模式——工厂模式

    <?php//文件名:Factory namespace IMooc; class Factory { //工程模式 static function creatDatabase() { $db ...