| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380 |
- <%@ page contentType="text/html;charset=GBK"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <head>
- <title>账户列表</title>
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
- <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js"
- type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/yw/fm/account/accountWaiBuTree.js"></script>
- <script type="text/javascript">
- // var dialog = null;
- var dialog = "";
- var grid = null;
- var height=400;
- $(function() {
- initAccountDetailGrid();
- });
- $(document).ready(function(){
- $("#layout1").ligerLayout({
- leftWidth : 250,
- height : '99%'
- });
- initAccountDetailGrid();
- $("#leftTree").height(height);
- });
- function initAccountDetailGrid(params) {
- var columns = [
- {
- display : '帐户名',
- name : 'account_name',
- width : 150
- },
- {
- display : '开户银行',
- name : 'blank_name',
- width : 150
- },{
- display : '银行账号',
- name : 'blank_account',
- width : 200
- }
- , {
- display : '账户类型',
- name : 'account_type',
- width : 80,
- render : function (row){
- if(row.account_type=='1'){
- return "客户";
- }else if(row.account_type=='2'){
- return "供应商";
- }else{
- return "其他";
- }
- }
- }, {
- display : '状态',
- name : 'state',
- width : 80
- }, {
- display : '创建时间',
- name : 'create_date',
- width : 150
- } ];
- columns
- .push({
- display : '操作',
- width : 100,
- isAllowHide : false,
- render : function(row) {
- var html = '<a href=\"#\" onclick=\"editAccountDetail('+ row.universalid + ')\">编辑</a> ';
- // if(row.state==2){
- // html += '<a href=\"#\" onclick=\"delAccountDetail('+ row.universalid +','+row.state+ ')\">删除</a> ';
-
- html += '<a href=\"#\" onclick=\"delAccountDetail('+ row.universalid + ')\">删除</a> ';
- // html += '<a href=\"#\" onclick=\"viewAccountDetail('+ row.universalid + ')\">查看</a> ';
-
- return html;
- }
- });
- grid = $("#maingrid4")
- .ligerGrid(
- {
- columns : columns,
- pageSize : 20,
- url : 'fmAccountDetailAction.do?task=accountDetailList&type=2&time=' + new Date().getTime() + params,
- pageParmName : 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
- width : '99.9%',
- height : '98%'
- });
- $("#pageloading").hide();
- $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
- }
- //查询
- function searchByKword(tree) {
- var s = "";
- var account_id ="";
-
- if(tree=="tree"){
- account_id = $("#account_id").val();
- }else{
- account_id = $("#_account_id").val();
- }
- var account_name = $("#account_name").val();
- if(account_name != "" && typeof (account_name) != "undefined"){
- s += "&account_name=" + encodeURI(encodeURI(account_name));
- }
- account_id= $("#account_id").val()
- if (account_id != "" && typeof (account_id) != "undefined") {
- s += "&account_id=" + account_id;
- }
- //alert(account_id);
- var blank_id = $("#blank_id").val();
- if (blank_id != "" && typeof (blank_id) != "undefined") {
- s += "&blank_id=" + blank_id;
- }
- var blank_account = $("#blank_account").val();//规则名称
- if (blank_account != "" && typeof (blank_account) != "undefined") {
- s += "&blank_account=" + encodeURI(encodeURI(blank_account));
- }
- //alert(blank_account);
- var state = $("#state").val();
- // alert(state);
- if (state != "" && typeof (state) != "undefined") {
- s += "&state=" + state;
- }
- grid.set("newPage","1");
- initAccountDetailGrid(s);
- }
- function f_select() {
- var rows = grid.getCheckedRows();
- return rows;
- }
-
- //查看账户明细
- // function viewTarget(universalid){
- // addTab('viewTarget' + getCurrentTabId(), '查看账户明细', '${pageContext.request.contextPath }/hrPerformanceTargetAction.do?task=viewTarget&universalid='
- // + universalid + '&tabid=' + getCurrentTabId(),true,true);
- // }
- //编辑账户明细
- function editAccountDetail(universalid){
- // addTab('editTarget' + getCurrentTabId(), '编辑考核指标', '${pageContext.request.contextPath }/hrPerformanceTargetAction.do?task=toEditTarget&universalid='
- // + universalid + '&tabid=' + getCurrentTabId(),true,true);
- dialog = $.ligerDialog.open({ height:320,width:490, title:"编辑银行账号",url: 'fmAccountDetailAction.do?task=toEditAccountDetail&type=2&universalid='+ universalid});
- }
- //删除账户明细
- // function delTarget(universalid,state){
- // if(state=='1'){
- // alert('请先把指标状态修改成停用!');
- // return;
- // }
- // if (window.confirm("确定要删除吗?")){
- // addTab('delTarget' + getCurrentTabId(), '删除账户明细', '${pageContext.request.contextPath }/hrPerformanceTargetAction.do?task=delTarget&universalid='
- // + universalid + '&tabid=' + getCurrentTabId(),true,true);
- // }
- // }
- //删除账户明细
- function delAccountDetail(universalid){
- // if (window.confirm("确定要删除新增银行账号信息吗")){
- // addTab('delTeacher' + getCurrentTabId(), '删除新增银行账号信息', '${pageContext.request.contextPath }/fmAccountDetailAction.do?task=delAccountDetail&universalid='
- // + universalid + '&tabid=' + getCurrentTabId(),true,true);
- // }
- // alert(universalid);
- $.ligerDialog.confirm('确定要删除新增银行账号吗?', function (yes)
- {
- if(yes){
- $.ajax({
- type:"POST",
- url:"fmAccountDetailAction.do?task=delAccountDetail",
- data : {"universalid":universalid},
- timeout:10000,
- cache:false,
- dataType:"json",
- success:function(data){
- var success = data.success;
- if(success){
- $.ligerDialog.success(success);
- searchByKword();
- // initAccountDetailGrid();
- }else{
- showAjaxError(null, data.error);
- }
- },
- error:showAjaxError
- });
- }
- });
- }
- //新增开户银行
- function addBlank(){
- dialog = $.ligerDialog.open({ height: 440,width:600, title:"新增开户银行",url: 'fmBlankAction.do?task=toAddBlank'});
- }
- //新增银行账户
- function addAccountDetail(){
- var account_id= $("#account_id").val();
- var status= $("#status").val();
- var account_type=$("#account_type").val();
- // alert(account_type);
- // var data = $("#to_count").ligerGetGridManager().getData();
- // alert("date"+data.length);
- // alert("star:"+status+"account_id"+account_id);
- if(account_id=="" || account_id==null ){
- alert("请先选择账户名子类别!");
- return ;
- }
- if(account_id == 1){
- $.ligerDialog.warn('根目录不能新增银行账号!');
- return;
- }
- if(status=="" || status==null || status=="2"){
- alert("该账户名已被停用,请先启用!");
- return ;
- }
- // if(account_type=="3"){
- // alert("该账户名类型是现金,不能新增银行账号!");
- // return ;
- // }
- // if (data.length == 0 ) {
- // alert("请先选择添加对应课程测学员!");
- // return;
- // }
- dialog = $.ligerDialog.open({ height:320,width:490,title:"新增银行账号",url: 'fmAccountDetailAction.do?task=toAddAccountDetail&type=2&account_id='+account_id+''});
- }
- function addProjectRow(){
- grid.addEditRow();
- }
-
- // 导入
- var importDlg;
- function importExcel(){
- var type="fmAccount";
- importDlg = $.ligerDialog.open({
- height: 120,
- width:440,
- url: 'fmSubjectImportAction.do?task=toImport&type='+type,
- allowClose:false,
- title:'导入科目数据',
- buttons : [ {
- text : '导入',
- onclick : function(item,dialog){
- dialog.frame.importExcel(window);
- }
- },{
- text : '关闭',
- onclick : function(item,dialog){
- importDlg.close();
- refreshWindow();
- window.parent.loadTree();
- grid.loadData();
- }
- }]
- });
- }
-
- </script>
- <style type="text/css">
- body {
- padding: 5px;
- margin: 0;
- }
- #layout1 {
- width: 99.5%;
- margin: 0;
- padding: 0;
- }
- .l-button {
- margin-left: 1px;
- }
- /* #deptBtn { */
- /* /* width: 100%; */ */
- /* background: #e5ecf9; */
- /* text-align: center; */
- /* height: 25px; */
- /* padding-top: 3px */
- /* } */
- .l-layout-left {
- overflow-y: auto;
- }
- </style>
- </head>
- <%-- <BODY onload="refresh(${suc})"> --%>
- <BODY>
- <%@ include file="/include/button.jsp"%>
- <%@ include file="/include/message.jsp"%>
- <div class="l-content">
- <div id="layout1">
- <input type="hidden" name="account_id" id="account_id" value="${account_id}""/>
- <input type="hidden" name="status" id="status" value="${status}""/>
- <input type="hidden" name="account_type" id="account_type" value="${account_type}""/>
- <input type="hidden" name="typeRootId" id="typeRootId" value="${typeRootId }"/>
- <input type="hidden" name="asset_search_type" id="asset_search_type" value=""/>
- <div position="left" title="账户分类" class="user-tree-style">
- <div id="deptBtn">
- <input type="button" value="新增" class="l-button" onclick="addAccountType()" id="addAccountTypeBtn" style="width:40px;"/>
- <input type="button" value="编辑" class="l-button" onclick="editAccountType()" id="editAccountTypeBtn" style="width:40px;" />
- <input type="button" value="删除" class="l-button" onclick="delAccountType()" id="delAccountTypeBtn" style="width:40px;"/>
- </div>
- <div id="leftTree" style="overflow:auto;position:relative;">
- <ul id="accountTree" class="tree" style="margin-top: 3px;">
- </ul>
- </div>
- </div>
- <div position="center" id="assetList" title="账户列表">
- <div id="deptBtn" style="text-align:left;">
- <input type="button" class="l-button" value="新增银行账号" onclick="addAccountDetail()" style="width:90px;margin-left:10px;"/>
-
- <input type="button" class="l-button" value="开户银行" onclick="addBlank()" style="width:90px;margin-left:30px;"/>
-
- <!-- <input type="button" value="导入" class="l-button" onclick="importExcel()" id="importExcelBtn" /> -->
-
-
- </div>
- <div class="default_search" style="margin: 0;">
- <ul style="width:39%;">
- <li class="title">账户名:</li>
- <li class="text">
- <input type="text" name="account_name" id="account_name"/>
- </li>
- </ul>
- <ul style="width:30%;">
- <li class="title" >开户银行:</li>
- <li class="text">
- <select id="blank_id" name="blank_id" style="width:140px;">
- <option value="" selected="selected">-请选择-</option>
- <c:forEach items="${blankList}" var="item">
- <option value="${item.universalid }" ${requestScope.blank.universalid==item.universalid ?"selected":"" }>${item.blank_name}</option>
- </c:forEach>
- </select>
- </li>
- </ul>
- <ul style="width:30%;">
- <li class="title" > 银行帐号:</li>
- <li class="text"><input style="width: 130px;" type="text" name="blank_account" id="blank_account" />
- </li>
- </ul>
- <ul >
- <li class="title" >状态:</li>
- <li class="text" >
- <select id="state" name="state" style="width:100px;">
- <option value="" selected="selected">-请选择-</option>
- <c:forEach items="${statusList}" var="item">
- <option value="${item.dvalue }" >${item.dname}</option>
- </c:forEach>
- </select>
- </li>
- </ul>
- <ul >
- <li class="search-button"><input type="button" class='l-button'
- name="search" onclick="searchByKword()" value="查询" /></li>
- </ul>
- </div>
- <div style="overflow: hidden; clear: both;">
- <div id="maingrid4" style="margin: 0; padding: 0"></div>
- </div>
- </div>
- </div>
- </div>
- </BODY>
- </HTML>
|