代码如下:

@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" οnclick="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 formwidth: 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 formrecreateForm: true,beforeShowForm: function(e) {deleteCssHandle(e);},onClick: function(e) {}},{//search formrecreateForm: 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 formrecreateForm: 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='查看贷款申请详细' οnclick='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-iconbuttons.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-iconbuttons.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);}"});}}

转载于:https://www.cnblogs.com/honghong75042/p/4585404.html

jqGrid添加详细按钮,单击弹出窗体相关推荐

  1. showdialog wpf 如何关闭_WPF用ShowDialog()弹出窗体时控制该窗体的显示位置,并传值回父窗体...

    原文:http://blog.csdn.net/kiss0622/article/details/5852153 方法一: 1.父窗口代码 Window1.xaml.cs private void B ...

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

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

  3. html5鼠标点击弹出层,jQuery实现单击弹出Div层窗口效果(可关闭可拖动)

    本文实例讲述了jQuery实现单击弹出Div层窗口效果.分享给大家供大家参考.具体如下: 这是一款jquery实现的可拖动可关闭的弹出框效果,网上已经有很多类似效果了,网页上实现这种效果其实并不难,现 ...

  4. 在PYQT5中,点击主窗口中的按钮,弹出子窗口

    目录 例1: 例2: 例3: 例4: 需求: 在PYQT5中,点击主窗口中的按钮,弹出子窗口. 测试代码: 例1: from PyQt5.QtWidgets import * import syscl ...

  5. 线程中使用SaveFileDialog不能弹出窗体

    在子线程中使用 SaveFileDialog 无法弹出窗体,主要是我们需要用主线程去处理 SaveFileDialog , 我们可以将子线程进行如下设置: public partial class F ...

  6. fancybox关闭弹出窗体parent.$.fancybox.close();

    fancybox弹出窗体右上角会自带一个关闭窗体,而且点击遮罩层也会关闭fancybox 有时我们不须要这样进行关闭,隐藏关闭窗体,而且遮罩层不可点击 在弹出窗体页面加一链接进行关闭 使用parent ...

  7. 微信小程序点击按钮实现弹出模态框

    效果如下图 wxml如下: <button bindtap="popup">弹出</button><!-- 弹出层 --><view cl ...

  8. android 初学者实现 popupwindow的自动弹出,Android popupWindow弹出窗体实现方法分析

    本文实例讲述了Android popupWindow弹出窗体实现方法.分享给大家供大家参考,具体如下: 1. 建立popupwindow显示的布局页面(普通的view任意布局) android:lay ...

  9. [原创]jQuery动画弹出窗体支持多种展现方式

    今天刚写的利用jQuery动画弹出窗体,支持了string.Ajax.iframe.controls四种展现方式,具体细节下面慢慢介绍,先看效果图. 动画效果 从哪个对象上触发的即从该对象开始逐渐向屏 ...

  10. Ext入门学习系列(二)弹出窗体

    第二章 弹出窗体 上节学习了Ext的环境搭建和最基本的一个操作--弹出对话框,作为一个引子,本节讲述如何弹出一个新窗体,从实例讲解Ext的基本运行原理. 一.Ext的窗体长什么样? 先来看看几个效果, ...

最新文章

  1. VS2015编译ffmpeg 3.4.2
  2. 夏俊:深入网站服务端技术(一)——网站并发的问题
  3. 关于浮点数的原理详解
  4. frameset用法
  5. IrregularGridCollectionView处理不定宽度的标签cell
  6. python Django ORM ,用filter方法表示“不等于”的方法
  7. ifconfig没有ip地址_虚拟机创建后该如何获取IP地址并访问互联网实用教程
  8. vue 项目难点_Vue 项目里戳中你痛点的问题及解决办法
  9. 极简代码(七)—— SNR
  10. 工业上 计算机控制系统分为哪两大类,控制仪表及装置——考试复习题
  11. Permission denied (publickey) 解决方案
  12. 计算机工程制图课程安排,2017工程制图课程简介
  13. 【无线芯片解读】2.4G专题:(SI24R1简版)Ci24R1
  14. 用php做滚动,用PHP+java实现自动新闻滚动窗口
  15. 将电脑多余空间分给其他盘
  16. 8、ARM嵌入式系统:UART初始化
  17. 什么是句柄、什么是自上而下、自下而上分析—编译原理
  18. phoenix 安装以及开启后报错
  19. 音乐播放器android-1.0
  20. QS电子计算机世界排名,莱斯大学电子计算机世界排名

热门文章

  1. Redis随项目启动或CRUD进行缓存数据
  2. maven私服搭建:docker安装Sonatype Nexus以及寻找admin用户对应的随机初始密码
  3. pls-00302: 必须声明 组件_vue组件
  4. unity打开excel表格_Excel电子表格需要双击两次才能打开问题的解决方案
  5. 论文发表在什么期刊上_设计论文发表【期刊论文】设计论文发表
  6. file* linux,Linux基础——file命令与magic file
  7. hadoop在windows上的环境配置及HDFS API编程示范
  8. jdbc 自增id 原理_如何实现 Oracle 的自增序列,两步轻松搞定
  9. 鸿蒙系统会有彩蛋吗,华为新系统亮点不断,一个新功能让人欢呼,升级后还有惊喜彩蛋...
  10. 剑三哪些插件是必备的_日常学习、办公必备的浏览器插件丨附安装教程(三)...