<%@ Page Language="C#" AutoEventWireup="true" debug="true" Inherits="WinLibClass.Form.Admin.GoodsCurrencyLog.Update"  CodePage="65001" AdminUserType="0" %>


<script type="text/javascript"> 



jQuery(document).ready(function(){

	<%
	if(DefaultTimeZeroByMyself.AddDays(1).CompareTo(DataInfo.SendTime)>0)
	{
	%>
	jQuery("#BtnSubmit").click(function(){SaveSub();});
	jQuery("#input_selectComp").click(function(){FirmSelectDlg(jQuery("#CompanyId").val());});
	jQuery("#input_selectForm").click(function(){UserOrderFormSelectDlg(jQuery("#OrderFormId").val());});
	jQuery("#input_selectAddress").click(function(){UserAddressSelectDlg(jQuery("#UserAddressId").val(),jQuery("#UserId").val());});
	<%
	}
	else
	{
	%>
		jQuery("#input_selectComp").hide();
		jQuery("#input_selectForm").hide();
		jQuery("#input_selectAddress").hide();
	<%
	}
	%>
	
});
function SaveSub(){

	<%
	if(DefaultTimeZeroByMyself.AddDays(1).CompareTo(DataInfo.SendTime)<0 || DataInfo.IsChecked==1)
	{
		//Response.Write("Common.ShowTipWarning('温馨提示','货已发，您的发货信息不必再更改了^_^。',3);");
		Response.Write("return false;");
	}
	%>

	var pass= true;
	if(jQuery("#OrderFormId").val()=="") pass=false;
	if(pass){
			var queryString = $('#form_add').serialize()
			jQuery.ajax({
				async:false,
				type: "POST",
				url: "/UserInfo/GoodsCurrencyLog/Update.aspx?IsAdd=20",
				data:queryString,
				cache: false,
				success: function(msg){
						if(msg=='1'){ 
							Common.ShowTipSuccess(false,'<%=(DataInfo.ID>0)?"修改":"添加" %>成功!',1);
							Common.EditDialgClose("GoodsCurrencyLog");
							<%
								if(UrlReferrerType==0)
								{
							%>
							var urlParam = "";
							SimpleAjax(APP+"/Admin/GoodsCurrencyLog_List"+client_GetPageNoToUrlParam()+urlParam,"");//刷新
							<%
								}
							%>
						}else{
							if(msg.indexOf("您的权限不足")<0){msg = "<%=(DataInfo.ID>0)?"修改":"添加" %>失败,请检查各项输入是否正确或网络连接状态.";	}
							Common.ShowTipError('权限受限',msg,2);
						}
				},
				error:function(msg){Common.ShowTipError('异常提示','写入数据库异常',2);}
			});		
		}
		else{Common.ShowTipError('异常提示','数据验证无效，请检查后再提交。',2);}

		return false;
		//&nbsp;&nbsp;
}
</script> 


<div style="height:auto;border:0px;width:720px;">
	<form id="form_add">
		<div class="TableUpdateDiv"  style="width:99%;">
		<div style="width:98%;">
			<table class="TableUpdate" style="text-align:left;">
			

			
			<tr >
			<td >				
				
				<INPUT TYPE="hidden" NAME="id" id="ID" style="width:50px;"  value="<%=DataInfo.ID%>" />
				订单号:
				<INPUT TYPE="text" NAME="OrderFormId" id="OrderFormId" class="InputReadonly" style="width:260px;" value="<%=DataInfo.OrderFormId%>" readonly /> 
				<a hre0f="javascript:;"  id="input_selectForm" value="选择订单" >选择订单</a>
				成交价:&yen;
				<INPUT TYPE="text" NAME="RealPrice" id="RealPrice" class="InputReadonly" value="<%=DataInfo.RealPrice/100f%>" readonly />					
			</td>
			</tr>
			
			<tr >
			<td >				
				
				<input type="text" name="GameTypeName" id="GameTypeName" style="border:0px;width:26px;font-size:12px;" value = "<%=WinLibClass.Form.FormCommon.Utils.GameString(DataInfo.GameType)[0]%>" readonly />期号:
				<INPUT TYPE="text" NAME="VendueId" id="VendueId" class="InputReadonly" style="width:100px" value="<%=DataInfo.VendueId%>" /> 
				<INPUT TYPE="hidden" NAME="GameType" id="GameType" style="width:50px;"  value="<%=DataInfo.GameType%>" />
				
				产品:
				<INPUT TYPE="text" NAME="ProductName" id="ProductName" class="InputReadonly" value="<%=DataInfo.ProductName%>" readonly />
				<INPUT TYPE="hidden" NAME="ProductId " id="ProductId " class="InputReadonly" style="width:50px;" value="<%=DataInfo.ProductId %>" readonly />
				<INPUT TYPE="hidden" NAME="MarketPrice" id="MarketPrice" class="InputReadonly" value="<%=DataInfo.MarketPrice/100f%>" readonly />				
				
				
			</td>
			</tr>



			<tr >
			<td >
				物流公司:
				<INPUT TYPE="text" NAME="CompanyName" id="CompanyName" class="InputReadonly" value="<%=DataInfo.CompanyName%>" readonly /> 
				<a hre0f="javascript:;"  id="input_selectComp" value="选择物流公司" >选择物流公司</a>
				物流编号:			
				<INPUT TYPE="text" NAME="CurrencyId" id="CurrencyId" style="width:200px" class="InputReadonly" value="<%=DataInfo.CurrencyId%>" readonly /> 

				<INPUT TYPE="hidden" NAME="CompanyId" id="CompanyId" style="width:50px;" value="<%=DataInfo.CompanyId%>" readonly />
				<INPUT TYPE="hidden" NAME="CompanyLogo" id="CompanyLogo" style="width:50px;" value="<%=DataInfo.CompanyLogo%>" readonly />				
			</td>
			</tr>	
			

			

			

			
			<tr>
			<td>		
			

				会员昵称:
				<INPUT TYPE="text" NAME="UserNickName" id="UserNickName" class="InputReadonly" value="<%=DataInfo.UserNickName%>" readonly />
				会员手机号:
				<INPUT TYPE="text" NAME="UserMobile" id="UserMobile" class="InputReadonly" value="<%=DataInfo.UserMobile%>" readonly />

				<INPUT TYPE="hidden" NAME="UserId" id="UserId" value="<%=DataInfo.UserId%>" readonly />
			
			</td>
			</tr>	


			<tr>
			<td>

				收货人姓名:
				<INPUT TYPE="text" NAME="UserRealName" id="UserRealName" class="InputReadonly" value="<%=DataInfo.UserRealName%>" readonly />
				收货人邮编:
				<INPUT TYPE="text" NAME="UserPostCode" id="UserPostCode" class="InputReadonly" value="<%=DataInfo.UserPostCode%>" readonly />


			</td>
			</tr>	


			<tr>
			<td>				
				<INPUT TYPE="hidden" NAME="UserAddressId" id="UserAddressId" class="InputReadonly" value="<%=DataInfo.UserAddressId%>" readonly />
				收货人地址:
				<INPUT TYPE="text" NAME="UserAddress" id="UserAddress" class="InputReadonly" style="width:500px;" value="<%=DataInfo.UserAddress%>" readonly />
				<a hre0f="javascript:;"  id="input_selectAddress" value="选择收货地址" >选择收货地址</a>
			</td>
			</tr>	
			<tr>
			<td>				
				
				发货时间: 
				<%=DefaultTimeZeroByMyself.AddDays(1).CompareTo(DataInfo.SendTime)>0?"未发货":DataInfo.SendTime.ToString("yyyy-MM-dd")%> 
				<INPUT TYPE="hidden" NAME="SendTime" id="SendTime" class="InputReadonly" value="<%=DataInfo.SendTime.ToString("yyyy-MM-dd HH:mm:ss")%>" readonly /> 
			</td>
			</tr>	
			
			<tr>
			<td>				
				到货时间: 
				<%=DefaultTimeZeroByMyself.AddDays(1).CompareTo(DataInfo.EndTime)>=0?"未到货":DataInfo.EndTime.ToString("yyyy-MM-dd")%>
				<INPUT TYPE="hidden" NAME="EndTime" id="EndTime" class="InputReadonly" style="border:0px" value="<%=DataInfo.EndTime.ToString("yyyy-MM-dd HH:mm:ss")%>" readonly /> 
			</td>
			</tr>	
			
			<tr>
			<td>
				当前状态:本货品 <%=DataInfo.IsChecked==1?"<font color='green'>已发出</font>":"<font color='red'>未发出</font>"%>
				 [ 发货状态由网站运营商负责设置 ]
			</td>
			</tr>	




			
			<tr title="ext" style="display:none1;">
			<td >
			
			<INPUT TYPE="hidden" NAME="OrderId" id="OrderId" value="<%=DataInfo.OrderId%>" readonly />			
			<INPUT TYPE="hidden" NAME="IsChecked" id="IsChecked" value="<%=DataInfo.IsChecked%>" readonly />
			<INPUT TYPE="hidden" NAME="Remark" id="Remark" value="<%=DataInfo.Remark%>" readonly />

<div>
<b>说明：</b> <br />
&nbsp;&nbsp; &nbsp;&nbsp; 操作顺序：<br />
&nbsp;&nbsp; &nbsp;&nbsp; 1.先点击“选择订单”按钮，获取订单的必要信息，如订单对应的会员信息、游戏类型和游戏期号、商品名称等。<br />
&nbsp;&nbsp; &nbsp;&nbsp; 2.再点击“选择物流公司”按钮，确定发货方式。<br />
&nbsp;&nbsp; &nbsp;&nbsp; 3.再点击“选择收货地址”按钮，确定收货详细信息。<br />
&nbsp;&nbsp; &nbsp;&nbsp; 4.运营商会根据您的选择安装商品的邮寄，当商品邮寄后，以上信息锁定。<br />
&nbsp;&nbsp; &nbsp;&nbsp; 5.您随时可以浏览您的发货信息。

</div>
			</td>
			</tr>					
			
			</table>
			</div>
		</div>	
	
	</form>
	
</div>

