protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Hi.Model.DIS_Order OrderModel = OrderBll.GetModel(KeyID); if (OrderModel != null) { //this.txtBillNo.Value = OrderModel.BillNo; //if (OrderModel.IsBill == 1) //{ // this.txtBillNo.Attributes["readonly"] = "readonly"; // this.rdoIsBillNo.Attributes["disabled"] = "true"; // this.rdoIsBillOk.Attributes["disabled"] = "true"; // this.rdoIsBillOk.Checked = true; // this.rdoIsBillNo.Checked = false; // this.Save.Visible = false; //} //else //{ // this.rdoIsBillOk.Checked = false; // this.rdoIsBillNo.Checked = true; //} } } }
protected void Bind() { this.txtDisUser.InnerText = Common.GetUserName(this.UserID); this.hidDisUserId.Value = this.UserID.ToString(); if (KeyID != 0) { if (!Common.PageCompOperable("Order", KeyID, CompID)) { Response.Redirect("../../NoOperable.aspx"); return; } Hi.Model.DIS_Order OrderInfoModel = OrderInfoBll.GetModel(KeyID); if (OrderInfoModel != null) { string js = "<script language=javascript>history.go(-1);</script>"; //编辑订单时 判断订单状态 if (OrderInfoModel.AddType == (int)Enums.AddType.企业补单 || OrderInfoModel.AddType == (int)Enums.AddType.App企业补单) { //企业补单 if (OrderInfoModel.OState >= (int)Enums.OrderState.已审 && OrderInfoModel.PayState != (int)Enums.PayState.未支付) { HttpContext.Current.Response.Write(string.Format(js)); } } else { //App下单 网页下单 if (OrderInfoModel.OState >= (int)Enums.OrderState.待审核) { HttpContext.Current.Response.Write(string.Format(js)); } } this.lblReceiptNo.InnerText = OrderInfoModel.ReceiptNo; DisId = OrderInfoModel.DisID; this.hidTotalAmount.Value = OrderInfoModel.TotalAmount.ToString("N"); this.txtArriveDate.Value = OrderInfoModel.ArriveDate == DateTime.MinValue ? "" : OrderInfoModel.ArriveDate.ToString("yyyy-MM-dd"); this.txtDisUser.InnerText = Common.GetUserName(OrderInfoModel.DisUserID); this.hidDisUserId.Value = OrderInfoModel.DisUserID.ToString(); this.txtRemark.Value = OrderInfoModel.Remark; } } else { //清除商品数据 SelectGoods.Clear(); } }
protected void rptOrder_ItemCommand(object source, RepeaterCommandEventArgs e) { string type = e.CommandName; Id = Convert.ToInt32(e.CommandArgument); if (type == "del") { Hi.Model.DIS_Order OrderInfoModel = OrderInfoBLL.GetModel(Id); if (OrderInfoModel != null) { if (OrderInfoModel.OState == (int)Enums.OrderState.退回 || OrderInfoModel.OState == (int)Enums.OrderState.未提交) { OrderInfoModel.dr = 1; bool falg = OrderInfoBLL.OrderDel(OrderInfoModel); if (falg) { //JScript.ShowAlert(this, ""); Bind(); } } else { JScript.AlertMsgOne(this, "订单处理中,不能删除!", JScript.IconOption.错误); } } } }
/// <summary> /// 签收 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void btnSing_Click(int KeyID) { Hi.BLL.DIS_Order OrderBll = new Hi.BLL.DIS_Order(); Hi.Model.DIS_Order OrderModel = OrderBll.GetModel(KeyID); if (OrderModel.OState == (int)Enums.OrderState.已发货 && OrderModel.ReturnState == (int)Enums.ReturnState.未退货) { Hi.Model.DIS_OrderOut OutModel = new Hi.BLL.DIS_OrderOut().GetOutModel(KeyID); OutModel.SignDate = DateTime.Now; OutModel.SignRemark = ""; OutModel.SignUser = this.UserName; OutModel.SignUserId = this.UserID; OutModel.IsSign = 1; OutModel.ts = DateTime.Now; OutModel.modifyuser = this.UserID; if (OrderInfoType.SignOrder(OutModel, OrderModel) > 0) { Utils.AddSysBusinessLog(this.CompID, "Order", KeyID.ToString(), "订单签收", ""); new Common().GetWxService("3", KeyID.ToString(), "1"); string str = "\"str\":true"; str = "{" + str + "}"; Response.Write(str); Response.End(); //Bind(); } } }
/// <summary> /// 菜单操作 /// </summary> /// <param name="Oid"></param> /// <param name="PageIndex"></param> /// <returns></returns> public string OrderMeau(string Oid) { string Str_Meau = ""; Oid = Server.UrlDecode(Oid); string id = Common.DesDecrypt(Oid, Common.EncryptKey); if (id == "") { return(""); } Hi.Model.DIS_Order OrderModel = OrderInfoBLL.GetModel(id.ToString().ToInt(0)); if (OrderModel != null) { if (this.Erptype == 0) { //非U8、U9等用户 可以对订单进行操作 if (OrderModel.OState == (int)Enums.OrderState.待审核) { //if (Common.HasRight(this.CompID,this.UserID, "1012")) //Str_Meau += "<a class='tablelinkQx' style='cursor: pointer;' onclick='return RegionAudit(\"" + Server.UrlEncode(Oid) + "\")'>审核</a>"; Str_Meau += "<a class='tablelinkQx' style='cursor: pointer;' href='../newOrder/orderdetail.aspx?top=1&KeyID=" + Server.UrlEncode(Oid) + "'>详情</a>"; } //else if (OrderModel.OState == (int)Enums.OrderState.已发货){ } else if (OrderModel.OState == (int)Enums.OrderState.已审 && (OrderModel.PayState == (int)Enums.PayState.已支付 || OrderModel.PayState == (int)Enums.PayState.部分支付 || OrderModel.Otype == (int)Enums.OType.赊销订单) && OrderModel.ReturnState == (int)Enums.ReturnState.未退货) { //if (Common.HasRight(this.CompID,this.UserID, "1013")) //Str_Meau += "<a class='tablelinkQx' style='cursor: pointer;' onclick='return ship(\"" + Server.UrlEncode(Oid) + "\"," + OrderInfoType.JuOrder(id.ToInt(0)) + ")'>发货</a>"; Str_Meau += "<a class='tablelinkQx' style='cursor: pointer;' href='../newOrder/orderdetail.aspx?top=1&KeyID=" + Server.UrlEncode(Oid) + "'>详情</a>"; } else if ((OrderModel.OState == (int)Enums.OrderState.已审) && (OrderModel.Otype != (int)Enums.OType.赊销订单 || OrderModel.PayState == (int)Enums.PayState.未支付) && OrderModel.ReturnState == (int)Enums.ReturnState.未退货) { Str_Meau += "<a class='tablelinkQx' style='cursor: pointer;' href='../newOrder/orderdetail.aspx?top=1&KeyID=" + Server.UrlEncode(Oid) + "'>详情</a>"; } else { Str_Meau += "<a class='tablelinkQx' style='cursor: pointer;' href='../newOrder/orderdetail.aspx?top=1&KeyID=" + Server.UrlEncode(Oid) + "'>详情</a>"; } } else { //U8、U9等用户 不能对订单进行操作 Str_Meau += "<a class='tablelinkQx' style='cursor: pointer;' href='../newOrder/orderdetail.aspx?top=1&KeyID=" + Server.UrlEncode(Oid) + "'>详情</a>"; } } return(Str_Meau); }
/// <summary> /// 绑定数据 /// </summary> public void Bind() { if (KeyID != 0) { if (!Common.PageCompOperable("Order", KeyID, CompID)) { Response.Redirect("../../NoOperable.aspx"); return; } Hi.Model.DIS_Order OrderModel = OrderBll.GetModel(KeyID); if (OrderModel != null) { DisID = OrderModel.DisID; this.PrintDate.InnerText = DateTime.Now.ToString("yyyy年MM月dd日"); this.lblReceiptNo.InnerText = OrderModel.ReceiptNo; this.lblDisName.InnerText = Common.GetDis(OrderModel.DisID, "DisName"); this.lblCreateDate.InnerText = OrderModel.CreateDate == DateTime.MinValue ? "" : OrderModel.CreateDate.ToString("yyyy-MM-dd"); this.lblDisUser.InnerText = Common.GetUserName(OrderModel.DisUserID); this.lblOtype.InnerText = OrderInfoType.OType(OrderModel.Otype); this.lblTotalPrice.InnerText = OrderModel.AuditAmount.ToString("N"); this.lblPayState.InnerText = OrderInfoType.PayState(OrderModel.PayState); this.lblPayPrice.InnerText = OrderModel.PayedAmount.ToString("N"); if (OrderModel.PayState == (int)Enums.PayState.未支付) { this.lblPayState.Attributes.Add("style", "Color:Red"); } else { this.lblPayState.Attributes.Add("style", "Color:green"); } this.lblAddr.InnerText = Common.GetAddr(OrderModel.AddrID); this.lblRemark.InnerText = OrderModel.Remark; BindOrderDetail(DisID); } } }
public static string Edit(string KeyID, string type, string remark) { remark = Common.NoHTML(remark); Common.ResultMessage Msg = new Common.ResultMessage(); if (type == "0") { Hi.BLL.DIS_Order OrderBll = new Hi.BLL.DIS_Order(); int oID = Common.DesDecrypt(KeyID, Common.EncryptKey).ToInt(0); Hi.Model.DIS_Order OrderModel = OrderBll.GetModel(oID); if (OrderModel != null) { OrderModel.Remark = Common.NoHTML(remark); OrderModel.ts = DateTime.Now; if (OrderBll.Update(OrderModel)) { Msg.result = true; Msg.code = OrderModel.ts.ToString("yyyy-MM-dd HH:mm"); } } else { Msg.code = "未查找到数据"; } } else if (type == "1") { Hi.BLL.DIS_OrderDetail OrderBllDetail = new Hi.BLL.DIS_OrderDetail(); Hi.Model.DIS_OrderDetail OrderModelDetail = OrderBllDetail.GetModel(KeyID.ToInt(0)); if (OrderModelDetail != null) { OrderModelDetail.Remark = Common.NoHTML(remark); OrderModelDetail.ts = DateTime.Now; if (OrderBllDetail.Update(OrderModelDetail)) { Msg.result = true; } } } else { Msg.result = true; } return(new JavaScriptSerializer().Serialize(Msg)); }
public static string Edit(string KeyID, string type, string tip) { Common.ResultMessage Msg = new Common.ResultMessage(); Hi.BLL.DIS_Order OrderBll = new Hi.BLL.DIS_Order(); Hi.Model.DIS_Order OrderModel = OrderBll.GetModel(Common.DesDecrypt(KeyID, Common.EncryptKey).ToInt(0)); if (OrderModel != null) { if (OrderModel.OState == -1 || OrderModel.OState == 0 || OrderModel.OState == 1 || OrderModel.OState == 2) { if (type == "0") { if (tip != "") { OrderModel.ArriveDate = tip.ToDateTime(); } else { OrderModel.ArriveDate = DateTime.MinValue; } OrderModel.ts = DateTime.Now; if (OrderBll.Update(OrderModel)) { Msg.result = true; } } else { OrderModel.GiveMode = tip; OrderModel.ts = DateTime.Now; if (OrderBll.Update(OrderModel)) { Msg.result = true; } } } } else { Msg.code = "未查找到数据"; } return(new JavaScriptSerializer().Serialize(Msg)); }
protected void Page_Load(object sender, EventArgs e) { if (KeyID != 0) { if (!Common.PageDisOperable("Order", KeyID, this.DisID)) { Response.Redirect("../NoOperable.aspx"); return; } order = OrderBll.GetModel(KeyID); if (order != null) { //receiptno = order.ReceiptNo; //DisID = order.DisID; //Otype = OrderInfoType.OType(order.Otype); //if (user != null) //{ // //UserID = user.ID; // //CompID = user.CompID; // //DisID = user.DisID; // //DisUser = new Hi.BLL.SYS_Users().GetModel(order.DisUserID); // //if (DisUser != null) // //{ // // truename = DisUser.UserName; // // BindGoods(); // //} //} //else //{ // Response.Redirect("orderlist.aspx"); //} } else { Response.Redirect("orderlist.aspx"); } // if (Request["KeyID"] != null) // { // KeyID = int.Parse(Request["KeyID"]); // } // if (KeyID != 0) // { // order = OrderBll.GetModel(KeyID); // if (order != null) // { // Otype = OrderInfoType.OType(order.Otype); // if (user != null) // { // truename = user.TrueName; // BindGoods(); // } // } // else // { // Response.Redirect("orderlist.aspx"); // } // } // else // { // Response.Redirect("orderlist.aspx"); // } } }
/// <summary> /// 绑定数据 /// </summary> public void Bind() { if (KeyID != 0) { //判断改该条数据代理商是否有操作权限 if (!Common.PageDisOperable("Order", KeyID, this.DisID)) { Response.Redirect("../NoOperable.aspx"); return; } Hi.Model.DIS_Order OrderModel = OrderBll.GetModel(KeyID); if (OrderModel != null) { // this.lblOtype.InnerText = OrderInfoType.OType(OrderModel.Otype); this.lblReceiptNo.InnerText = OrderModel.ReceiptNo; this.lblRemark.InnerText = OrderModel.Remark; //this.hidAddrId.Value = OrderModel.AddrID.ToString(); //this.lblAddr.InnerText = Common.GetAddr(OrderModel.AddrID); //this.lblAddr.InnerText = OrderModel.Address; this.lblCreateDate.InnerText = OrderModel.CreateDate == DateTime.MinValue ? "" : OrderModel.CreateDate.ToString("yyyy-MM-dd"); this.lblOState.InnerText = OrderInfoType.OState(OrderModel.ID); if (OrderInfoType.PayState(OrderModel.PayState) == "已支付") { this.lblPayState.InnerHtml = "<span style='color:green'>" + OrderInfoType.PayState(OrderModel.PayState) + "</span>"; } else if (OrderInfoType.PayState(OrderModel.PayState) == "未支付") { this.lblPayState.InnerHtml = "<span style='color:red'>" + OrderInfoType.PayState(OrderModel.PayState) + "</span>"; } else { this.lblPayState.InnerHtml = "<span style='color:blue'>" + OrderInfoType.PayState(OrderModel.PayState) + "</span>"; } // this.lblAddType.InnerText = OrderInfoType.AddType(OrderModel.AddType); //this.lblTotalPrice.InnerText = OrderModel.TotalAmount.ToString("N"); this.lblTotalPrice.InnerText = OrderModel.AuditAmount.ToString("N"); //this.lblOtherAmount.InnerText = OrderModel.OtherAmount.ToString("N"); //this.lblAuditAmount.InnerText = OrderModel.AuditAmount.ToString("N"); this.lblPayedPrice.InnerText = OrderModel.PayedAmount.ToString("N"); this.lblDisUser.InnerText = Common.GetUserName(OrderModel.DisUserID); this.lblArriveDate.InnerText = OrderModel.ArriveDate == DateTime.MinValue ? "" : OrderModel.ArriveDate.ToString("yyyy-MM-dd"); this.lblfymc.InnerText = OrderModel.vdef2; //this.lblAuditUser.InnerText = Common.GetUserName(OrderModel.AuditUserID); //this.lblAuditDate.InnerText = OrderModel.AuditDate == DateTime.MinValue ? "" : OrderModel.AuditDate.ToString("yyyy-MM-dd"); //this.lblAuditRemark.InnerText = OrderModel.AuditRemark; //订单操作 OrderState(OrderModel); #region 页面操作 if (Request["type1"] == "RepOrderList") { payIcon.Visible = false; prnIcon.Visible = false; offIcon.Visible = false; copyIcon.Visible = false; SingIcon.Visible = false; removeIcon.Visible = false; DelIcon.Visible = false; editIcon.Visible = false; Exp.Visible = false; Log.Visible = false; returnIcon.Visible = true; } if (Request["type1"] == "RepDetailsList") { payIcon.Visible = false; prnIcon.Visible = false; offIcon.Visible = false; copyIcon.Visible = false; SingIcon.Visible = false; removeIcon.Visible = false; DelIcon.Visible = false; editIcon.Visible = false; Exp.Visible = false; Log.Visible = false; returnIcon.Visible = true; } if (Request["type1"] == "RepZdzfDetailsList") { payIcon.Visible = false; prnIcon.Visible = false; offIcon.Visible = false; copyIcon.Visible = false; SingIcon.Visible = false; removeIcon.Visible = false; DelIcon.Visible = false; editIcon.Visible = false; Exp.Visible = false; Log.Visible = false; returnIcon.Visible = true; } //支付 if (Request["type1"] == "orderpaylist") { payIcon.Visible = true; prnIcon.Visible = false; offIcon.Visible = false; copyIcon.Visible = false; SingIcon.Visible = false; removeIcon.Visible = false; DelIcon.Visible = false; editIcon.Visible = false; Exp.Visible = false; Log.Visible = false; returnIcon.Visible = true; } if (Request["type1"] == "UserList") { payIcon.Visible = false; prnIcon.Visible = false; offIcon.Visible = false; copyIcon.Visible = false; SingIcon.Visible = false; removeIcon.Visible = false; DelIcon.Visible = false; editIcon.Visible = false; Exp.Visible = false; Log.Visible = true; returnIcon.Visible = true; } if (Request["type1"] == "ReceivingList") { payIcon.Visible = false; prnIcon.Visible = false; offIcon.Visible = false; copyIcon.Visible = false; SingIcon.Visible = true; removeIcon.Visible = false; DelIcon.Visible = false; editIcon.Visible = false; Exp.Visible = true; //this.Exp.Attributes.Add("style", "display:inline-block;"); Log.Visible = true; returnIcon.Visible = true; } if (Request["type1"] == "ReceivingList1") { payIcon.Visible = false; prnIcon.Visible = false; offIcon.Visible = false; copyIcon.Visible = false; SingIcon.Visible = false; removeIcon.Visible = false; DelIcon.Visible = false; editIcon.Visible = false; Exp.Visible = true; //this.Exp.Attributes.Add("style", "display:inline-block;"); Log.Visible = true; returnIcon.Visible = true; } if (Request["type1"] == "ReturnOrderList1") { payIcon.Visible = false; prnIcon.Visible = false; offIcon.Visible = false; copyIcon.Visible = false; SingIcon.Visible = false; removeIcon.Visible = true; DelIcon.Visible = false; editIcon.Visible = false; Exp.Visible = false; Log.Visible = true; returnIcon.Visible = true; } #endregion } } else { Response.Redirect("../NoOperable.aspx"); return; } }
public void Bind() { //取消按钮显示 //this.btnRemove.Attributes.Add("style", "display:none;"); //this.btnRemove.Style["display"] = "none"; Hi.Model.DIS_Order OrderInfoModel = OrderInfoBll.GetModel(KeyID); if (OrderInfoModel != null) { this.lblDisName.InnerText = Common.GetDis(OrderInfoModel.DisID, "DisName"); this.hidDisId.Value = OrderInfoModel.DisID.ToString(); DisId = OrderInfoModel.DisID; this.lblOtype.InnerText = OrderInfoType.OType(OrderInfoModel.Otype); this.lblReceiptNo.InnerText = OrderInfoModel.ReceiptNo; this.lblRemark.InnerText = OrderInfoModel.Remark; this.hidAddrId.Value = OrderInfoModel.AddrID.ToString(); this.lblAddr.InnerText = OrderInfoModel.Address; this.lblCreateDate.InnerText = OrderInfoModel.CreateDate.ToString("yyyy-MM-dd"); this.lblOState.InnerText = OrderInfoType.OState(OrderInfoModel.ID); this.lblPayState.InnerText = OrderInfoType.PayState(OrderInfoModel.PayState); this.lblTotalPrice.InnerText = OrderInfoModel.TotalAmount.ToString("0.00"); //this.lblOtherAmount.InnerText = OrderInfoModel.OtherAmount.ToString("0.00"); this.lblPayedPrice.InnerText = OrderInfoModel.PayedAmount.ToString("0.00"); this.lblDisUser.InnerText = Common.GetUserName(OrderInfoModel.DisUserID); this.lblArriveDate.InnerText = OrderInfoModel.ArriveDate == DateTime.MinValue ? "" : OrderInfoModel.ArriveDate.ToString("yyyy-MM-dd"); BindOrderDetail(OrderInfoModel.DisID); if (OrderInfoModel.OState == (int)Enums.OrderState.退回) { //this.Remove.Attributes.Add("style", "display:none;"); //取消订单 //this.Return.Attributes.Add("style", "display:none;"); //退回 //this.Edit.Attributes.Add("style", "display:inline-block;"); //编辑 //this.Del.Attributes.Add("style", "display:none;"); //删除 this.Shipping.Attributes.Add("style", "display:none;"); //发货 //this.Clearing.Attributes.Add("style", "display:none;"); //去结算 //this.PrePayMonery.Attributes.Add("style", "display:none;"); //预收款申请 //this.Submit.Attributes.Add("style", "display:inline-block;"); //提交 this.Audit.Attributes.Add("style", "display:none;"); //审核 } if (OrderInfoModel.OState == (int)Enums.OrderState.未提交) { //this.Remove.Attributes.Add("style", "display:none;"); //this.Return.Attributes.Add("style", "display:none;"); } if (OrderInfoModel.OState == (int)Enums.OrderState.待审核) { //this.Edit.Attributes.Add("style", "display:none;"); //this.Del.Attributes.Add("style", "display:none;"); this.Shipping.Attributes.Add("style", "display:none;"); //this.Clearing.Attributes.Add("style", "display:none;"); //this.PrePayMonery.Attributes.Add("style", "display:none;"); //this.Submit.Attributes.Add("style", "display:none;"); //this.Return.Attributes.Add("style", "display:inline-block;"); this.Audit.Attributes.Add("style", "display:inline-block;"); //this.Remove.Attributes.Add("style", "display:inline-block;"); } if (OrderInfoModel.OState < (int)Enums.OrderState.待审核 || OrderInfoModel.OState > (int)Enums.OrderState.已审) { //this.Return.Attributes.Add("style", "display:none;"); this.Audit.Attributes.Add("style", "display:none;"); this.Shipping.Attributes.Add("style", "display:none;"); //this.Clearing.Attributes.Add("style", "display:none;"); //this.PrePayMonery.Attributes.Add("style", "display:none;"); } if (OrderInfoModel.OState == (int)Enums.OrderState.已审) { //this.Return.Attributes.Add("style", "display:none;"); this.Audit.Attributes.Add("style", "display:none;"); //this.Edit.Attributes.Add("style", "display:none;"); //this.Del.Attributes.Add("style", "display:none;"); //this.Submit.Attributes.Add("style", "display:none;"); //this.Remove.Attributes.Add("style", "display:inline-block;"); if (OrderInfoModel.Otype == (int)Enums.OType.赊销订单) { //this.Clearing.Attributes.Add("style", "display:none;"); //this.PrePayMonery.Attributes.Add("style", "display:none;"); this.Shipping.Attributes.Add("style", "display:inline-block;"); } else { if (OrderInfoModel.PayState > (int)Enums.PayState.未支付) { //this.Clearing.Attributes.Add("style", "display:none;"); //this.PrePayMonery.Attributes.Add("style", "display:none;"); this.Shipping.Attributes.Add("style", "display:inline-block;"); } else { //this.Clearing.Attributes.Add("style", "display:none;"); //this.PrePayMonery.Attributes.Add("style", "display:none;"); this.Shipping.Attributes.Add("style", "display:none;"); } } } if (OrderInfoModel.OState == (int)Enums.OrderState.已作废) { //this.Return.Attributes.Add("style", "display:none;"); //this.Remove.Attributes.Add("style", "display:none;"); this.Shipping.Attributes.Add("style", "display:none;"); //this.Submit.Attributes.Add("style", "display:none;"); //if (OrderInfoModel.PayState > (int)Enums.PayState.未支付) //{ // this.Clearing.Attributes.Add("style", "display:none;"); // this.PrePayMonery.Attributes.Add("style", "display:none;"); //} } } }
public void Bind() { //取消按钮显示 if (KeyID > 0) { Hi.Model.DIS_Order OrderInfoModel = OrderInfoBll.GetModel(KeyID); //if (Request["showtype"] == "PayZdblList") //{ // zd.InnerText = "账单查询详细"; //} //if (Request["showtype"] == "PaymentZdblcxList") //{ // //zd.InnerText = "账单补录详细"; //} string PostType = string.Empty; if (Request["PostType"] != null) { PostType = Request["PostType"].ToString(); } if (OrderInfoModel != null) { this.lblDisName.InnerText = Common.GetDis(OrderInfoModel.DisID, "DisName"); this.hidDisId.Value = OrderInfoModel.DisID.ToString(); DisId = OrderInfoModel.DisID; this.lblReceiptNo.InnerText = OrderInfoModel.ReceiptNo; this.lblRemark.InnerText = OrderInfoModel.Remark; this.lblAddr.InnerText = OrderInfoModel.vdef2; this.lblCreateDate.InnerText = OrderInfoModel.CreateDate == DateTime.MinValue ? "" : OrderInfoModel.CreateDate.ToString("yyyy-MM-dd"); this.lblOState.InnerText = OrderInfoType.OState(OrderInfoModel.ID); this.lblPayState.InnerText = OrderInfoType.PayState(OrderInfoModel.PayState); if (OrderInfoModel.PayState == (int)Enums.PayState.未支付) { this.lblPayState.Attributes.Add("style", "Color:Red"); } else { this.lblPayState.Attributes.Add("style", "Color:green"); } this.lblTotalPrice.InnerText = OrderInfoModel.AuditAmount.ToString("N"); this.lblPayedPrice.InnerText = OrderInfoModel.PayedAmount.ToString("N"); this.lblDisUser.InnerText = Common.GetUserName(OrderInfoModel.DisUserID); this.lblArriveDate.InnerText = OrderInfoModel.ArriveDate == DateTime.MinValue ? "" : OrderInfoModel.ArriveDate.ToString("yyyy-MM-dd"); if (!PostType.Equals("1")) { if (OrderInfoModel.OState == (int)Enums.OrderState.退回) { this.Remove.Visible = false; this.Edit.Visible = true; } if (OrderInfoModel.OState == (int)Enums.OrderState.未提交) { this.Remove.Visible = false; } if (OrderInfoModel.OState == (int)Enums.OrderState.待审核) { if (OrderInfoModel.AddType != (int)Enums.AddType.企业补单) { this.Edit.Visible = false; } this.Remove.Visible = true; } if (OrderInfoModel.OState == (int)Enums.OrderState.已审) { this.Edit.Visible = false; if (OrderInfoModel.PayState == (int)Enums.PayState.未支付) { this.Remove.Visible = true; } else { this.Remove.Visible = false; } } if (OrderInfoModel.OState == (int)Enums.OrderState.已作废) { this.Remove.Visible = false; this.CopyOrder.Visible = false; this.Edit.Visible = false; } if (OrderInfoModel.OState > (int)Enums.OrderState.退货处理 && OrderInfoModel.OState < (int)Enums.OrderState.已到货) { this.Remove.Visible = false; this.CopyOrder.Visible = false; this.Edit.Visible = false; } if ((OrderInfoModel.OState >= (int)Enums.OrderState.退货处理 && OrderInfoModel.ReturnState != (int)Enums.ReturnState.未退货) && OrderInfoModel.OState <= (int)Enums.OrderState.已退货) { this.Remove.Visible = false; this.CopyOrder.Visible = false; this.Edit.Visible = false; } } else { this.Remove.Visible = false; this.CopyOrder.Visible = false; this.Edit.Visible = false; } if (PostType.Equals("3")) { btn.Visible = false; this.btnright.Attributes.Add("style", "margin-top:0px; margin-left:0px; width:auto;"); //btntitle.Visible = false; this.lblpaytime.InnerText = Request["Date"] == null ? "" : Request["Date"].ToString(); this.paytime1.Visible = true; this.paytime2.Visible = true; } else { this.state.Attributes.Add("colspan", "5"); } } } else { Response.Write("数据错误!"); Response.End(); } }