<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/html5.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/respond.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/PIE_IE678.js"></script>
<![endif]-->
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/common/admin/lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>添加备注</title>
<style type="text/css">
	.col-2{width: 20%;}
	.col-10{width: 80%;}
</style>
</head>
<body>
	
		<div class="row cl">
			<div > 
				<label class="form-label col-2"><span class="c-red">*</span>详细备注：</label>
			</div>
			<div class="pd-20">
				<textarea id="remark" name="remark" cols="" rows="" class="textarea">${imageText.imagetextContext }</textarea>
			</div>
		</div>
		
	    <div class="row cl">
	      <div class="col-9 col-offset-3">	      
	        <input class="btn btn-primary radius"  onclick="updateWithdrawStatus(${withdrawId },${whthdrawStatus });" type="button"  value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
	      </div>
	    </div>
</div>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/tips.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/layer/1.9.3/layer.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.js"></script> 
<script type="text/javascript" src="${pageContext.request.contextPath }/common/admin/js/H-ui.admin.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/other/kingedit/kindeditor.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath }/common/other/kingedit/lang/zh_CN.js"></script>
<script type="text/javascript">


<!-- 注册文本编辑器 回显图文信息 -->
KindEditor.ready(function(K) {
       window.editor = K.create('#remark',{
       	fileManagerJson : '${pageContext.request.contextPath }/common/other/kingedit/jsp/file_manager_json.jsp',
           uploadJson : '${pageContext.request.contextPath }/common/other/kingedit/jsp/upload_json.jsp',
            allowFileManager : true,
            afterBlur: function(){this.sync();},
            width : '720px'
        });
});


function updateWithdrawStatus(id,status){
	if(!commonTypeJdg('remark',null,null,true)){
		layer.msg("备注不能为空",{icon: 2,time:2000});
		return false;
	}
	var whthdrawRemark = $("#remark").val();
	$.ajax({
		url : '${pageContext.request.contextPath }/admin/withdraw/updateWithdrawCashStatus',
		type : "POST",
		dataType : "json",
		data: {withdrawId:id,whthdrawStatus:status,whthdrawRemark:whthdrawRemark},
		beforeSubmit: function (data) {
        	  $("#through").attr("disabled","disabled");
        	  $("#rejected").attr("disabled","disabled");
          },
		success : function(data) {
			var message = "成功";
			if(data.status !=true){
				message = "失败";
			}
			layer.msg(message,{icon: 1,time:1000},function(){
				$("#through").attr("disabled","");
            	$("#rejected").attr("disabled","");
            	window.parent.location.href = '${pageContext.request.contextPath }/admin/withdraw/indexCash';
			});
		},
		error : function(data) {
			layer.msg(data.status,{icon: 5,time:1000});
		}
	});
}


</script>
</body>
</html>