Beispiel #1
0
    /// <summary>
    /// 绑定
    /// </summary>
    public void Bind()
    {
        if (KeyID != 0)
        {
            Hi.Model.DIS_OrderOut OrderOutModel = OrderOutBll.GetModel(KeyID);

            if (OrderOutModel != null)
            {
                OrderId = OrderOutModel.OrderID;

                this.lblReceiptNo.InnerText = OrderOutModel.ReceiptNo;
                this.lblOrderNo.InnerText   = OrderInfoType.getOrder(OrderOutModel.OrderID, "ReceiptNo");
                DisID = OrderOutModel.DisID;

                ProID    = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "ProID");
                ProPrice = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "ProAmount");
                ProIDD   = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "ProDID");
                ProType  = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "Protype");

                this.lblDisName.InnerText = Common.GetDis(OrderOutModel.DisID, "DisName");
                this.hidDisId.Value       = OrderOutModel.DisID.ToString();

                this.lblSendDate.InnerText = OrderOutModel.SendDate == DateTime.MinValue ? "" : OrderOutModel.SendDate.ToString("yyyy-MM-dd");
                //this.lblExpress.InnerText = OrderOutModel.Express;
                //this.lblExpressNo.InnerText = OrderOutModel.ExpressNo;
                //this.lblExpressPerson.InnerText = OrderOutModel.ExpressPerson;
                //this.lblExpressTel.InnerText = OrderOutModel.ExpressTel;
                //this.lblExpressBao.InnerText = OrderOutModel.ExpressBao.ToString();
                //this.lblPostFee.InnerText = OrderOutModel.PostFee.ToString("N");
                this.lblActionUser.InnerText = OrderOutModel.ActionUser;
                this.lblRemark.InnerText     = OrderOutModel.Remark;

                //签收信息
                this.lblIsSign.InnerText     = OrderOutModel.IsSign == 0 ? "未签收" : "已签收";
                this.lblSignUser.InnerText   = OrderOutModel.SignUser;
                this.hidSignUserId.Value     = OrderOutModel.SignUserId.ToString();
                this.lblSignDate.InnerText   = OrderOutModel.SignDate == DateTime.MinValue ? "" : OrderOutModel.SignDate.ToString("yyyy-MM-dd");
                this.lblSignRemark.InnerText = OrderOutModel.SignRemark;

                BindOrderDetail(OrderOutModel.OrderID, OrderOutModel.DisID);
            }
        }
    }
Beispiel #2
0
    //public Hi.Model.SYS_Users user = null;

    //public int KeyID = 0;
    //public int CompID = 0;

    protected void Page_Load(object sender, EventArgs e)
    {
        //user = LoginModel.IsLogined(this);
        //if (Request["KeyID"] != null)
        //{
        //    string Id = Common.DesDecrypt(Request["KeyID"].ToString(), Common.EncryptKey);
        //    KeyID = Id.ToInt(0);
        //    CompID = user.CompID;
        //}
        if (KeyID != 0)
        {
            //user = LoginModel.IsLogined(this);
            //if (user != null)
            //{
            if (KeyID != 0)
            {
                if (!Common.PageDisOperable("Order", KeyID, this.DisID))
                {
                    Response.Redirect("../NoOperable.aspx");
                    return;
                }

                order       = new Hi.BLL.DIS_Order().GetModel(KeyID);
                orderreturn = new Hi.BLL.DIS_OrderReturn().GetModel(order.ID.ToString());
                if (orderreturn == null)
                {
                    Response.Redirect("OrderList.aspx");
                }

                ReceiptNo = orderreturn.ReceiptNo;

                ProID    = OrderInfoType.getOrderExt(orderreturn.OrderID, "ProID");
                ProPrice = OrderInfoType.getOrderExt(orderreturn.OrderID, "ProAmount");
                ProIDD   = OrderInfoType.getOrderExt(orderreturn.OrderID, "ProDID");
                ProType  = OrderInfoType.getOrderExt(orderreturn.OrderID, "Protype");

                this.lblTotalPrice.InnerText = order.AuditAmount.ToString("N");

                Hi.Model.SYS_Users disuser = new Hi.BLL.SYS_Users().GetModel(orderreturn.AuditUserID);
                switch (orderreturn.ReturnState)
                {
                case -1: ReturnState = "已拒绝";
                    AuditUserName    = disuser == null ? "" : disuser.TrueName;
                    AuditDate        = orderreturn.AuditDate.ToString("yyyy-MM-dd");
                    AuditRemark      = orderreturn.AuditRemark;
                    A_btn.InnerHtml  = "<a href=\"#\" onclick=\"returnLog();\" class=\"btnBl\"><i class=\"dailyIcon\"></i>日志</a><a href=\"returnorderlist.aspx\" class=\"btnBl\"><i class=\"returnIcon\"></i>返回</a>";
                    //增加修改,取消退货按钮代码,把后面一截拷进去就OK了   <a href=\"returnorderadd.aspx?KeyID="+KeyID+"&type=update\" class=\"btnBl\"><i class=\"editIcon\"></i>修改退货单</a><a href=\"#\" onclick=\"offIcon();\" class=\"btnBl\"><i class=\"offIcon\"></i>取消退货单</a>
                    break;

                case 0: ReturnState = "未提交"; A_btn.InnerHtml = "<a href=\"#\" onclick=\"editIcon();\" class=\"btnOr\"><i class=\"editIcon\"></i>提交退货单</a><a href=\"#\" onclick=\"offIcon();\" class=\"btnBl\"><i class=\"offIcon\"></i>取消退货单</a><a href=\"#\" onclick=\"returnLog();\" class=\"btnBl\"><i class=\"dailyIcon\"></i>日志</a><a href=\"#\" onclick=\"areturn()\" class=\"btnBl\"><i class=\"returnIcon\"></i>返回</a>"; break;

                case 1: ReturnState = "待审核"; A_btn.InnerHtml = "<a href=\"#\" onclick=\"returnLog();\" class=\"btnBl\"><i class=\"dailyIcon\"></i>日志</a><a href=\"ReturnOrderList.aspx\" class=\"btnBl\"><i class=\"returnIcon\"></i>返回</a>"; break;

                case 2: ReturnState = "已退货";
                    AuditUserName   = disuser == null ? "" : disuser.TrueName;
                    AuditDate       = orderreturn.AuditDate.ToString("yyyy-MM-dd");
                    AuditRemark     = orderreturn.AuditRemark;
                    A_btn.InnerHtml = "<a href=\"#\" onclick=\"returnLog();\" class=\"btnBl\"><i class=\"dailyIcon\"></i>日志</a><a href=\"ReturnOrderList.aspx\" class=\"btnBl\"><i class=\"returnIcon\"></i>返回</a>";
                    break;

                case 4: ReturnState = "已退货款";
                    AuditUserName   = disuser == null ? "" : disuser.TrueName;
                    AuditDate       = orderreturn.AuditDate.ToString("yyyy-MM-dd");
                    AuditRemark     = orderreturn.AuditRemark;
                    A_btn.InnerHtml = "<a href=\"#\" onclick=\"returnLog();\" class=\"btnBl\"><i class=\"dailyIcon\"></i>日志</a><a href=\"ReturnOrderList.aspx\" class=\"btnBl\"><i class=\"returnIcon\"></i>返回</a>";
                    break;
                }
                CreateDate    = orderreturn.CreateDate.ToString("yyyy-MM-dd");
                ReturnContent = orderreturn.ReturnContent;
                BindGoods();
            }
            else
            {
                Response.Redirect("orderlist.aspx");
            }
        }
        if (!string.IsNullOrEmpty(Request["OffIcon"]) && Request["OffIcon"].ToString() == "true")
        {
            A_OffIcon(null, null);
        }
        if (!string.IsNullOrEmpty(Request["editIcon"]) && Request["editIcon"].ToString() == "true")
        {
            A_EditIcon(null, null);
        }
        //}
    }
Beispiel #3
0
    /// <summary>
    /// 绑定数据
    /// </summary>
    public void Bind()
    {
        string type = Request.QueryString["type"] + "";

        if (KeyID != 0)
        {
            if (!Common.PageCompOperable("ReturnOrder", KeyID, CompID))
            {
                Response.Redirect("../../NoOperable.aspx");
                return;
            }

            Hi.Model.DIS_OrderReturn OrderReturnModel = OrderReturnBll.GetModel(KeyID);

            if (OrderReturnModel != null)
            {
                this.lblDisName.InnerText = Common.GetDis(OrderReturnModel.DisID, "DisName");
                this.hidDisId.Value       = OrderReturnModel.DisID.ToString();
                DisId   = OrderReturnModel.DisID;
                OrderId = OrderReturnModel.OrderID;

                Hi.Model.DIS_Order OrderModel = new Hi.BLL.DIS_Order().GetModel(OrderId);

                this.lblReceiptNo.InnerText = OrderReturnModel.ReceiptNo;

                this.lblReturnDate.InnerText = OrderReturnModel.ReturnDate == DateTime.MinValue ? "" : OrderReturnModel.ReturnDate.ToString("yyyy-MM-dd");

                this.lblReturnUserID.InnerText = Common.GetUserName(OrderReturnModel.ReturnUserID.ToString().ToInt(0));
                this.lblReturnState.InnerText  = OrderInfoType.ReturnState(OrderReturnModel.ReturnState);
                //this.lblExpress.InnerText = OrderReturnModel.Express;
                //this.lblExpressNo.InnerText = OrderReturnModel.ExpressNo;
                this.lblReturnContent.InnerText = OrderReturnModel.ReturnContent;

                ProID    = OrderInfoType.getOrderExt(OrderReturnModel.OrderID, "ProID");
                ProPrice = OrderInfoType.getOrderExt(OrderReturnModel.OrderID, "ProAmount");
                ProIDD   = OrderInfoType.getOrderExt(OrderReturnModel.OrderID, "ProDID");
                ProType  = OrderInfoType.getOrderExt(OrderReturnModel.OrderID, "Protype");

                //订单信息
                this.lblOState.InnerText   = OrderInfoType.OState(OrderModel.ID);
                this.lblPayState.InnerHtml = OrderInfoType.PayState(OrderModel.PayState);
                if (OrderModel.PayState == (int)Enums.PayState.未支付)
                {
                    this.lblPayState.Attributes.Add("style", "Color:Red");
                }
                else
                {
                    this.lblPayState.Attributes.Add("style", "Color:green");
                }

                this.lblAddType.InnerText = OrderInfoType.AddType(OrderModel.AddType);
                this.lblOtype.InnerText   = OrderInfoType.OType(OrderModel.Otype);
                //订单总价
                this.lblTotalPrice.InnerText = OrderInfoType.getOrder(OrderReturnModel.OrderID, "AuditAmount");


                if (OrderReturnModel.AuditUserID == 0)
                {
                    this.trAuditUser.Attributes.Add("style", "display:none;");
                    this.trAuditRemark.Attributes.Add("style", "display:none;");
                }
                else
                {
                    this.trAuditUser.Attributes.Add("style", "");
                    this.trAuditRemark.Attributes.Add("style", "");
                }
                this.lblAuditUser.InnerText   = Common.GetUserName(OrderReturnModel.AuditUserID);
                this.lblAuditDate.InnerText   = OrderReturnModel.AuditDate == DateTime.MinValue ? "" : OrderReturnModel.AuditDate.ToString("yyyy-MM-dd");
                this.lblAuditRemark.InnerText = OrderReturnModel.AuditRemark;

                if (this.Erptype != 0)
                {
                    //U8、U9等用户  不能对订单进行操作
                    this.Audit.Visible       = false;
                    this.ReturnMoney.Visible = false;
                }
                else
                {
                    //非U8、U9等用户  可以对订单进行操作
                    #region
                    if (OrderReturnModel.ReturnState < (int)Enums.AuditState.提交)
                    {
                        //this.Audit.Attributes.Add("style", "display:none;");
                        //this.ReturnMoney.Attributes.Add("style", "display:none;");

                        this.Audit.Visible       = false;
                        this.ReturnMoney.Visible = false;
                    }
                    else if (OrderReturnModel.ReturnState == (int)Enums.AuditState.提交)
                    {
                        this.Audit.Visible       = true;
                        this.ReturnMoney.Visible = false;

                        //this.Audit.Attributes.Add("style", "display:inline-block;");
                        //this.ReturnMoney.Attributes.Add("style", "display:none;");
                    }
                    else if (OrderReturnModel.ReturnState == (int)Enums.AuditState.已审)
                    {
                        this.Audit.Visible = false;
                        //this.Audit.Attributes.Add("style", "display:none;");
                        if (OrderModel != null)
                        {
                            if (OrderModel.Otype != (int)Enums.OType.赊销订单)
                            {
                                if (type == "")
                                {
                                    this.ReturnMoney.Visible = false;
                                    //this.ReturnMoney.Attributes.Add("style", "display:none;");
                                }
                                else
                                {
                                    this.ReturnMoney.Visible = true;
                                    //this.ReturnMoney.Attributes.Add("style", "display:inline-block;");
                                }
                            }
                            else
                            {
                                if (OrderModel.PayState == (int)Enums.PayState.已支付)
                                {
                                    if (type == "")
                                    {
                                        this.ReturnMoney.Visible = false;
                                        //this.ReturnMoney.Attributes.Add("style", "display:none;");
                                    }
                                    else
                                    {
                                        this.ReturnMoney.Visible = true;
                                        //this.ReturnMoney.Attributes.Add("style", "display:inline-block;");
                                    }
                                }
                                else
                                {
                                    this.ReturnMoney.Visible = false;
                                    //this.ReturnMoney.Attributes.Add("style", "display:none;");
                                }
                            }
                        }
                    }
                    else if (OrderReturnModel.ReturnState == (int)Enums.AuditState.已完结)
                    {
                        this.Audit.Visible       = false;
                        this.ReturnMoney.Visible = false;
                        //this.Audit.Attributes.Add("style", "display:none;");
                        //this.ReturnMoney.Attributes.Add("style", "display:none;");
                    }
                    #endregion
                }
                BindOrderDetail(OrderReturnModel.OrderID, OrderReturnModel.DisID);
            }
        }
        else
        {
            Response.Write("数据错误!");
            Response.End();
        }
    }
Beispiel #4
0
    /// <summary>
    /// 绑定
    /// </summary>
    public void Bind()
    {
        if (KeyID != 0)
        {
            if (!Common.PageCompOperable("OrderOut", KeyID, CompID))
            {
                Response.Redirect("../../NoOperable.aspx");
                return;
            }

            Hi.Model.DIS_OrderOut OrderOutModel = OrderOutBll.GetModel(KeyID);

            if (OrderOutModel != null)
            {
                OrderId = OrderOutModel.OrderID;
                ViewState["OrderId"]        = OrderId;
                OrderOutId                  = OrderOutModel.ID;
                this.lblReceiptNo.InnerText = OrderOutModel.ReceiptNo;
                this.lblOrderNo.InnerText   = OrderInfoType.getOrder(OrderOutModel.OrderID, "ReceiptNo");
                DisId = OrderOutModel.DisID;

                ProID    = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "ProID");
                ProPrice = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "ProAmount");
                ProIDD   = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "ProDID");
                ProType  = OrderInfoType.getOrderExt(OrderOutModel.OrderID, "Protype");

                this.lblDisName.InnerText = Common.GetDis(OrderOutModel.DisID, "DisName");
                this.hidDisId.Value       = OrderOutModel.DisID.ToString();

                this.lblSendDate.InnerText = OrderOutModel.SendDate == DateTime.MinValue ? "" : OrderOutModel.SendDate.ToString("yyyy-MM-dd");
                //this.lblExpress.InnerText = OrderOutModel.Express;
                //this.lblExpressNo.InnerText = OrderOutModel.ExpressNo;
                //this.lblExpressPerson.InnerText = OrderOutModel.ExpressPerson;
                //this.lblExpressTel.InnerText = OrderOutModel.ExpressTel;
                //this.lblExpressBao.InnerText = OrderOutModel.ExpressBao.ToString();
                //this.lblPostFee.InnerText = OrderOutModel.PostFee.ToString("N");
                //this.lblActionUser.InnerText = OrderOutModel.ActionUser;
                this.lblRemark.InnerText = OrderOutModel.Remark;

                //签收信息
                this.lblIsSign.InnerText     = OrderOutModel.IsSign == 0 ? "未签收" : "已签收";
                this.lblSignUser.InnerText   = OrderOutModel.SignUser;
                this.hidSignUserId.Value     = OrderOutModel.SignUserId.ToString();
                this.lblSignDate.InnerText   = OrderOutModel.SignDate == DateTime.MinValue ? "" : OrderOutModel.SignDate.ToString("yyyy-MM-dd");
                this.lblSignRemark.InnerText = OrderOutModel.SignRemark;

                BindOrderDetail(OrderOutModel.OrderID, OrderOutModel.DisID);

                if (this.Erptype != 0)
                {
                    //非U8、U9等用户  可以对订单进行操作
                    this.li_Express.Visible = true;
                }
            }
        }
        else
        {
            Response.Write("数据错误!");
            Response.End();
        }
    }