<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="member_account_correct.aspx.cs" Inherits="VA.Modules.JDingMember.member.member_account_correct" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>账户修正</title>
    <!--#include virtual="/include/css/edit.aspx"-->
    <!--#include virtual="/include/js/edit.aspx"-->     
    <script type="text/javascript">
    function save() {
        JTongAlertConfirm("确定要进行修正吗？", function () {

            var requestType = "POST";
            var url = pageName + "?act=save";  //pageName在BasePage中注册到的客户端；
            var dataType = "html";
            var data = $("form").eq(0).serialize();
            var successFN = function (data, textStatus) {
                if (data == "ok") {
                    showActResult("修正成功！", true, doAfterAct);
                } else if (data.indexOf("01|") != -1) {
                    showActResult(data.substring(3), false, doAfterAct);
                }
                else {
                    showActResult("修正失败：" + data, false, doAfterAct);
                }
            };
            ajaxRequest(requestType,
            url,
            dataType,
            data,
            successFN,
            errorFN
            );

        });
    }

    function doAfterAct(actResult) {
        if (actResult) {
            resetPage();
        }
    }

    function resetPage() {

        clearMemberInfo();

        $("#btnSubmit").attr("disabled", "disabled");        
    }   

    //会员信息加载成功时调用的方法；            
    function doWhenMemberInfoLoadSuc(memberInfo) {        
        if (memberInfo.status == "2") {
            JTongAlert('提示', '该会员已经处于挂失状态，不能对其账户进行修正！', 'error');
            $("#btnSubmit").attr("disabled", "disabled");
        }
        else if (memberInfo.status == "1") {
            $("#btnSubmit").removeAttr("disabled");
        }
    }

    //会员信息加载失败时调用的方法；
    function doWhenMemberInfoLoadFail() {
        
    }
    
    $(function () {
        if ($("#hfMemberID").val() == "") {            
            $("#btnSubmit").attr("disabled", "disabled");
        }        
    });

    </script>
</head>
<body>
<form id="Form1" method="post" runat="server">

<div class="editPageWrapper" style="width:700px;">

<div class="centerFormTitle">
   <h1>会员卡账户修正</h1>
</div>

<!--#include file="../include/memberinfo.aspx"-->     

<table cellspacing="0" cellpadding="3" class="editTable" style="margin-top:-1px;">
<tr>
<td class="th" colspan="2" style="font-weight:bold;text-align:left;">操作信息</td>
</tr>
<tr>
<td class="th">当前日期：</td>
<td>    
	<% = DateTime.Now %>
</td>
</tr>
<tr>
<td class="th">操作员：</td>
<td>    
	<% = base.EmployeeName %>
</td>
</tr>
<tr>
<td class="th">当前操作：</td>
<td>    
	<b>账户余额、账户积分修正</b>
</td>
</tr>
<tr>
<td class="th">说明：</td>
<td>    
	账户余额、账户积分修正的依据为账户余额流水账和积分流水账，执行修正前请确保流水账数据准确！
</td>
</tr>
<tr>
<td colspan="2" class="footer">

    <input type="button" id="btnSubmit" class="btn" style="width:80px" onclick="save()" value="修正" />
    <input type="button" id="btnClear" class="btn" style="width:80px" onclick="resetPage()" value="重置" />
 
</td>
</tr>
</table>

</div><!--editPageWrapper.END-->

</form>
</body>
</html>

