| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435 |
- <%@ include file="/include/head.jsp"%>
- <%@ page contentType="text/html;charset=GBK"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
- <%@ taglib uri="/WEB-INF/tlds/taglib.tld" prefix="OA"%>
- <!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="main.css" rel="stylesheet" type="text/css"></link>
- <link href="./liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css"
- rel="stylesheet" type="text/css"></link>
- <script type="text/javascript" src="/shares/js/jquery-1.3.2.min.js"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js"
- type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript">
- function editAccountType(){
- $("#sys_user_names").val($("#sys_user_name").val());
- //alert("DD"+$("#share_type").val())
- var type=$("#share_type").val();
- var type1=$("#account_type1").val();
- var rs = $.validate({name:"account.account_name",model:[{type:"require",msg:"账户名不能为空!"},{type:"len",min:0,max:30,msg:"账户名长度输入过长!"}]});
- rs &=$.validate({name :"account.remark",model :[{type:"len",min:0,max:500,msg:"备注长度输入过长!"}]});
- if(type=="2"){
- // alert("ddd");
- rs &=$.validate({name :"sys_user_names",model :[{type:"require",msg :"负责人不能为空!"}]});
- }
- if(type1==3){
- // alert("ddd");
- rs &= $.validate({
- name : "begin_balance",
- model : [
- {type:"require",msg:"期初余额不能为空!"},{
- type : "isNumber",
- msg : "期初余额只能为数字!"
- }, {
- type : "len",
- min : 0,
- max : 18,
- msg : "期初余额长度输入过长!"
- } ]
- });
- }
- if(!rs)return;
- $("#editAccountForm").submit();
- }
- $(function() {
- // showSuccessMsg("${requestScope.suc}");
- $(function (){
- var suc = "${requestScope.suc}";
- if(suc){
- // window.parent.initFinishMygrid3();
- var tabid = getCurrentTabId(); //刷新整个页面
- parent.window.location=tabid;
- window.parent.dialog.close();
- }
-
- });
- });
- function showSuccessMsg(isSucc) {
- if (isSucc) {
- var succMsg = '';
- if (isSucc == '1') {
- succMsg = '<a href="#"></a> 新建成功!'
- + ' <br/><br/>是否继续添加?<br/>';
- } else if (isSucc == '2') {
- succMsg = '<a href="#"></a> 修改成功!'
- + ' <br/><br/>是否继续编辑?<br/>';
- }
- $.ligerDialog({
- content : succMsg,
- title : "操作成功",
- type : "success",
- width : 200,
- height : 60,
- allowClose : false,
- buttons : [
- {
- text : "是",
- onclick : function() {
- // window.parent.initAccountDetailGrid();
- window.location.href = 'fmAccountAction.do?task=toEditAccount&account_id==${account.universalid}';
- }
- },
- {
- text : "否",
- onclick : function() {
- var tabid = getCurrentTabId(); //刷新整个页面
- parent.window.location=tabid;
- window.parent.dialog.close();
- }
- } ]
- });
- }
- }
- //选负责人
- $(function (){
- loadTypeTree("userButton", {
- type : "usersingle",
- backId : "sys_user_id",
- backName : "sys_user_name",
- tab:"1"
- });
- });
-
- $(function() {
- var is_share = "${account.is_share}";
- var sharePermission = is_share.split(",");
- $("input[name='is_share']").each(function(){
- var vl=$(this).val();
- //$(this).attr("disabled",false);
- for(var i=0;i<sharePermission.length;i++){
- if(vl == sharePermission[i]){
- $(this).attr("checked",true);
- }
- }
- });
- var shareType = "${account.account_attribute}";
- var type = "${account.account_type}";
- if(type == 3){
- $("#sharePermission2").removeAttr("style");
-
- }
- if(shareType == 1){
- $("#shareDept2").removeAttr("style");
- document.getElementById("shareDept3").style.display = "none";
- document.getElementById("shareDept").style.display = "none";
- document.getElementById("sharePermission").style.display = "none";
- }else if(shareType == 2){
- $("#shareDept").removeAttr("style");
- document.getElementById("shareDept2").style.display = "none";
- $("#shareDept3").removeAttr("style");
- $("#sharePermission").removeAttr("style");
- }
-
- });
- function changeShare(){
- if($("#share_type").val() == 2){
- $("#shareDept").removeAttr("style");
- document.getElementById("shareDept2").style.display = "none";
- $("#shareDept3").removeAttr("style");
- $("#sharePermission").removeAttr("style");
- }else if($("#share_type").val() ==1){
- document.getElementById("shareDept").style.display = "none";
- $("#shareDept2").removeAttr("style");
- document.getElementById("shareDept3").style.display = "none";
- document.getElementById("sharePermission").style.display = "none";
- }
- }
- function changeShare3(){
-
- if($("#account_type1").val() == 3){
- if($("#already2").val()==2){
- alert("该用户有银行账号,改为现金将会删除银行账号!")
- }
- $("#sharePermission2").removeAttr("style");
- }
- else if($("#account_type1").val() == 1){
- document.getElementById("sharePermission2").style.display = "none";
-
- }
- else if($("#account_type1").val() == 2){
- document.getElementById("sharePermission2").style.display = "none";
- }
-
- }
- </script>
- <style type="text/css">
- body {
- padding: 5px;
- margin: 0;
- }
- #layout1 {
- width: 100%;
- margin: 0;
- padding: 0;
- }
- .l-button {
- margin-left: 1px;
- }
- #deptBtn {
- width: 100%;
- background: #e5ecf9;
- text-align: center;
- height: 25px;
- padding-top: 3px
- }
- #leftBtn{
- width: 100%;
- background: #e5ecf9;
- height: 25px;
- padding-top: 3px
- }
- .l-layout-left {
- overflow-y: auto;
- }
- </style>
- </head>
- <body>
- <%@ include file="/include/button.jsp"%>
- <%@ include file="/include/message.jsp"%>
- <div class="l-content">
- <form id="editAccountForm" name="editAccountForm" method="post" action="fmAccountAction.do?task=editAccount">
- <input type="hidden" name="account_id" id="account_id" value="${account.universalid}" />
- <input id="already2" name="already2" type='hidden' value="${already2}" />
- <input id="already" name="already" type='hidden' value="${already}" />
- <input id="money" name="money" type='hidden' value="${account.account_type}" />
- <div id="layout1">
- <div position="center" id="center" class="forum-container">
- <c:if test="${already != 1}">
- </c:if>
- <c:if test="${already == 1}">
- <font color=red>该账户已发生交易,只能修改部分信息!</font>
- </c:if>
- <table border="0" cellspacing="1" cellpadding="0" class="l-table-edit line">
- <tr>
- <td class="l-table-edit-text">账户名<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td">
- <c:if test="${already != 1}">
- <input id="account.account_name" name="account.account_name" type='text' value=${account.account_name} style="width:150px"/>
-
- </c:if>
- <c:if test="${already == 1}">
- <input disabled="disabled" id="account.account_name" name="account.account_name" type='text' value=${account.account_name} style="width:150px"/>
- </c:if>
- <div><span id="tnmsg"></span></div></td>
- </tr>
- <tr>
- <td class="l-table-edit-text">账户属性<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td">
- <c:if test="${already != 1}">
- <!-- <select id="share_type" name="account_attribute" onchange="changeShare()" style="width:150px;"> -->
- <input type="hidden" id="share_type" name="account_attribute" value="1"/>
- 内部账户
- <%-- <c:if test="${account.account_attribute == 1}"> --%>
- <!-- <option value="1">内部账户</option> -->
- <!-- <option value="2">外部账户</option> -->
- <%-- </c:if> --%>
- <%-- <c:if test="${account.account_attribute == 2}"> --%>
- <!-- <option value="2">外部账户</option> -->
- <!-- <option value="1">内部账户</option> -->
- <%-- </c:if> --%>
-
- <!-- </select> -->
- </c:if>
- <c:if test="${already == 1}">
- <!-- <select disabled="disabled" id="share_type" name="account_attribute" onchange="changeShare()" style="width:150px;"> -->
- <input type="hidden" id="share_type" name="account_attribute" value="1"/>
- 内部账户
- <%-- <c:if test="${account.account_attribute == 1}"> --%>
- <!-- <option value="1">内部账户</option> -->
- <!-- <option value="2">外部账户</option> -->
- <%-- </c:if> --%>
- <%-- <c:if test="${account.account_attribute == 2}"> --%>
- <!-- <option value="2">外部账户</option> -->
- <!-- <option value="1">内部账户</option> -->
- <%-- </c:if> --%>
-
- <!-- </select> -->
- </c:if>
- </td>
- </tr>
- <tr id="shareDept2" style="display: ;">
- <td class="l-table-edit-text">账户类型<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td">
- <c:if test="${already != 1}">
- <select id="account_type1" name="account_type1" style="width:150px;" onchange="changeShare3()">
- <%-- <option value="${requestScope.target.state}" selected="selected">-请选择-</option> --%>
- <c:forEach items="${accountTypeList}" var="item">
- <option
- <c:if test="${item.dvalue eq requestScope.account.account_type}">
- selected="selected"
- </c:if>
- value="${item.dvalue }" >
- ${item.dname }
- </option>
- </c:forEach>
- </select>
- </c:if>
- <c:if test="${already == 1}">
- <select disabled="disabled" id="account_type1" name="account_type1" style="width:150px;" onchange="changeShare3()">
- <%-- <option value="${requestScope.target.state}" selected="selected">-请选择-</option> --%>
- <c:forEach items="${accountTypeList}" var="item">
- <option
- <c:if test="${item.dvalue eq requestScope.account.account_type}">
- selected="selected"
- </c:if>
- value="${item.dvalue }" >
- ${item.dname }
- </option>
- </c:forEach>
- </select>
- </c:if>
- </td>
- </tr>
- <tr id="shareDept3" style="display: none;">
- <td class="l-table-edit-text">账户类型<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td">
- <c:if test="${already != 1}">
- <select id="account_type2" name="account_type2" style="width:150px;">
- <%-- <option value="${requestScope.target.state}" selected="selected">-请选择-</option> --%>
- <c:forEach items="${accountTypeList2}" var="item">
- <option
- <c:if test="${item.dvalue eq requestScope.account.account_type}">
- selected="selected"
- </c:if>
- value="${item.dvalue }" >
- ${item.dname }
- </option>
- </c:forEach>
- </select>
- </c:if>
- <c:if test="${already == 1}">
- <select disabled="disabled" id="account_type2" name="account_type2" style="width:150px;">
- <%-- <option value="${requestScope.target.state}" selected="selected">-请选择-</option> --%>
- <c:forEach items="${accountTypeList2}" var="item">
- <option
- <c:if test="${item.dvalue eq requestScope.account.account_type}">
- selected="selected"
- </c:if>
- value="${item.dvalue }" >
- ${item.dname }
- </option>
- </c:forEach>
- </select>
- </c:if>
- </td>
- </tr>
- <tr id="shareDept3" style="display: none;">
- <td class="l-table-edit-text">账户类型<FONT COLOR="red">*</FONT>:</td>
- <td class="l-table-edit-td">
- <c:if test="${already != 1}">
- <select id="account_type1" name="account_type2" style="width:150px;">
- <%-- <option value="${requestScope.target.state}" selected="selected">-请选择-</option> --%>
- <c:forEach items="${accountTypeList2}" var="item">
- <option
- <c:if test="${item.dvalue eq requestScope.account.account_type}">
- selected="selected"
- </c:if>
- value="${item.dvalue }" >
- ${item.dname }
- </option>
- </c:forEach>
- </select>
- </c:if>
- <c:if test="${already == 1}">
- <select disabled="disabled" id="account_type1" name="account_type2" style="width:150px;">
- <%-- <option value="${requestScope.target.state}" selected="selected">-请选择-</option> --%>
- <c:forEach items="${accountTypeList2}" var="item">
- <option
- <c:if test="${item.dvalue eq requestScope.account.account_type}">
- selected="selected"
- </c:if>
- value="${item.dvalue }" >
- ${item.dname }
- </option>
- </c:forEach>
- </select>
- </c:if>
- </td>
- </tr>
- <tr id="sharePermission2" style="display:none;">
- <td class="l-table-edit-text">期初余额<FONT COLOR="red"></FONT>:
- </td>
- <td class="l-table-edit-td">
- <c:if test="${already!= 1}">
- <input
- id="begin_balance"
- name="begin_balance" type='text' value="${money}"
- style="width: 150px" />
- </c:if>
- <c:if test="${already == 1}">
- <input disabled="disabled"
- id="begin_balance"
- name="begin_balance" type='text' value="${money}"
- style="width: 150px" />
- </c:if>
- <div>
- <span id="tnmsg"></span>
- </div></td>
- </tr>
- <!-- <tr id="shareDept" style="display: ;"> -->
- <!-- <td class="l-table-edit-text">负责人<FONT COLOR="red">*</FONT>:</td> -->
- <!-- <td class="l-table-edit-td"> -->
- <%-- <input type="text" id="sys_user_name" name="sys_user_name" style="width:150px;" readonly="readonly" value="${account.account_operator}"/> --%>
- <%-- <input type="hidden" name="sys_user_id" id="sys_user_id" value="-${account.account_operator_id}"/> --%>
- <!-- <input type="button" class="l-button" value="选择" id="userButton"/> -->
- <!-- <input type="hidden" id="sys_user_names" name="sys_user_names" value=""/> -->
- <!-- </td> -->
- <!-- </tr> -->
- <!-- <tr id="sharePermission" style="display: "> -->
- <!-- <td class="l-table-edit-text">是否共享<FONT COLOR="red"></FONT>:</td> -->
- <!-- <td class="l-table-edit-td"> -->
- <!-- <input type="checkbox" id="is_share" name="is_share" value="1"/>是 -->
- <!-- <input type="hidden" id="is_share" name="account.is_share" value=""/> -->
- <!-- </td> -->
- <!-- </tr> -->
- <tr>
- <td class="l-table-edit-text" >状态<FONT COLOR="red"></FONT>:</td>
- <td class="l-table-edit-td">
- <select id="account.status" name="account.status" style="width:150px;">
- <%-- <option value="${requestScope.target.state}" selected="selected">-请选择-</option> --%>
- <c:forEach items="${statusList}" var="item">
- <option
- <c:if test="${item.dvalue eq requestScope.account.status}">
- selected="selected"
- </c:if>
- value="${item.dvalue }" >
- ${item.dname }
- </option>
- </c:forEach>
- </select>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text">备注<FONT COLOR="red"></FONT>:</td>
- <td class="l-table-edit-td">
- <textarea id="account.remark" name="account.remark" rows="6" cols="35">${requestScope.account.remark}</textarea>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </form>
- </div>
- </body>
- </html>
|