Example #1
0
        /// <summary>
        /// 确认收货
        /// </summary>
        public void Received()
        {
            int id  = RequestTool.RequestInt("id", 0);
            int tid = RequestTool.RequestInt("tid", 0);
            Lebi_Transport_Order torder = B_Lebi_Transport_Order.GetModel("User_id=" + CurrentUser.id + " and id = " + tid);

            if (torder == null)
            {
                Response.Write("{\"msg\":\"" + Tag("参数错误") + "\"}");
                return;
            }
            if (torder.Type_id_TransportOrderStatus != 220)
            {
                Response.Write("{\"msg\":\"" + Tag("当前状态不可收货") + "\"}");
                return;
            }
            if (torder.User_id != CurrentUser.id)
            {
                Response.Write("{\"msg\":\"" + Tag("参数错误") + "\"}");
                return;
            }
            torder.Type_id_TransportOrderStatus = 223;
            torder.Time_Received = System.DateTime.Now;
            B_Lebi_Transport_Order.Update(torder);
            EX_Area.UpdateShouHuoCount(torder);
            //发送短信
            SMS.SendSMS_orderrecive(CurrentUser, torder);
            Response.Write("{\"msg\":\"OK\"}");
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("order_shipping", "订单发货"))
            {
                WindowNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            torder = B_Lebi_Transport_Order.GetModel(id);
            if (torder == null)
            {
                Response.Write(Tag("参数错误"));
                Response.End();
                return;
            }
            model = B_Lebi_Order.GetModel(torder.Order_id);
            tps   = new List <TransportProduct>();
            JavaScriptSerializer jss = new JavaScriptSerializer();

            try
            {
                tps = jss.Deserialize <List <TransportProduct> >(torder.Product);
            }
            catch (Exception)
            {
                tps = new List <TransportProduct>();
            }
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = RequestTool.RequestInt("id", 0);

            torder = B_Lebi_Transport_Order.GetModel(id);
            if (torder == null)
            {
                Response.Write(Tag("参数错误"));
                Response.End();
                return;
            }
            string where = "id = " + torder.Order_id + "";
            if (!string.IsNullOrEmpty(EX_Admin.Project().Site_ids))
            {
                where += " and (Site_id in (" + EX_Admin.Project().Site_ids + "))";
            }
            if (!string.IsNullOrEmpty(EX_Admin.Project().Supplier_ids))
            {
                where += " and (Supplier_id in (" + EX_Admin.Project().Supplier_ids + "))";
            }
            order = B_Lebi_Order.GetModel(where);
            if (order == null)
            {
                Response.Write(Tag("参数错误"));
                Response.End();
                return;
            }
            pros = B_Lebi_Order_Product.GetList("Order_id=" + order.id + "", "");
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("order_shipping", "订单发货"))
            {
                WindowNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            string where = "id = " + id + "";
            if (!string.IsNullOrEmpty(EX_Admin.Project().Site_ids))
            {
                where += " and (Site_id in (" + EX_Admin.Project().Site_ids + "))";
            }
            if (!string.IsNullOrEmpty(EX_Admin.Project().Supplier_ids))
            {
                where += " and (Supplier_id in (" + EX_Admin.Project().Supplier_ids + "))";
            }
            model = B_Lebi_Order.GetModel(where);
            if (model == null)
            {
                model = new Lebi_Order();
            }

            pros            = B_Lebi_Order_Product.GetList("Order_id=" + model.id + "", "");
            transport_order = B_Lebi_Transport_Order.GetModel("Order_id = " + id);
            if (transport_order == null)
            {
                transport_order = new Lebi_Transport_Order();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = RequestTool.RequestInt("id", 0);

            torder = B_Lebi_Transport_Order.GetModel(id);
            if (torder == null)
            {
                Response.Write(Tag("参数错误"));
                Response.End();
                return;
            }
            order = B_Lebi_Order.GetModel(torder.Order_id);
            pros  = B_Lebi_Order_Product.GetList("Order_id=" + order.id + "", "");
        }
Example #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("order_shipping", "订单发货"))
            {
                WindowNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            torder = B_Lebi_Transport_Order.GetModel(id);
            if (torder == null)
            {
                Response.Write(Tag("参数错误"));
                Response.End();
                return;
            }
            log = EX_Area.GetKuaiDi100(torder);
        }
Example #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("order_shipping", "订单发货"))
            {
                WindowNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            torder = B_Lebi_Transport_Order.GetModel(id);
            if (torder == null)
            {
                Response.Write(Tag("参数错误"));
                Response.End();
                return;
            }
            string where = "Order_id = " + torder.Order_id + "";
            if (!string.IsNullOrEmpty(EX_Admin.Project().Site_ids))
            {
                where += " and (Site_id in (" + EX_Admin.Project().Site_ids + "))";
            }
            if (!string.IsNullOrEmpty(EX_Admin.Project().Supplier_ids))
            {
                where += " and (Supplier_id in (" + EX_Admin.Project().Supplier_ids + "))";
            }
            model = B_Lebi_Order.GetModel(where);
            if (model == null)
            {
                Response.Write(Tag("参数错误"));
                Response.End();
                return;
            }
            tps = new List <TransportProduct>();
            JavaScriptSerializer jss = new JavaScriptSerializer();

            try
            {
                tps = jss.Deserialize <List <TransportProduct> >(torder.Product);
            }
            catch (Exception)
            {
                tps = new List <TransportProduct>();
            }
        }
Example #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("order_shipping", "订单发货"))
            {
                WindowNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Order.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Order();
            }

            pros            = B_Lebi_Order_Product.GetList("Order_id=" + model.id + "", "");
            transport_order = B_Lebi_Transport_Order.GetModel("Order_id = " + id);
            if (transport_order == null)
            {
                transport_order = new Lebi_Transport_Order();
            }
        }
Example #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_order_edit", "编辑订单"))
            {
                WindowNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            torder = B_Lebi_Transport_Order.GetModel(id);
            if (torder == null)
            {
                Response.Write(Tag("参数错误"));
                Response.End();
                return;
            }
            order = B_Lebi_Order.GetModel(torder.Order_id);
            if (order.Supplier_id != CurrentSupplier.id)
            {
                Response.Write(Tag("参数错误"));
                Response.End();
                return;
            }
            pros = B_Lebi_Order_Product.GetList("Order_id=" + order.id + "", "");
        }
Example #10
0
        /// <summary>
        /// 退货单发货
        /// </summary>
        public void torder_shipping()
        {
            int        order_id = RequestTool.RequestInt("order_id", 0);
            Lebi_Order model    = B_Lebi_Order.GetModel("User_id=" + CurrentUser.id + " and id = " + order_id);

            if (model == null)
            {
                Response.Write("{\"msg\":\"" + Tag("参数错误") + "\"}");
                return;
            }
            if (model.IsVerified != 1)
            {
                Response.Write("{\"msg\":\"" + Tag("请等待客服人员确认") + "\"}");
                return;
            }
            Lebi_Transport_Order torder = B_Lebi_Transport_Order.GetModel("Order_id=" + model.id + "");

            if (torder != null)
            {
                torder.Code           = RequestTool.RequestSafeString("Code");
                torder.Transport_Name = RequestTool.RequestSafeString("Transport_Name");
                B_Lebi_Transport_Order.Update(torder);
            }
            else
            {
                Lebi_Supplier supplier = B_Lebi_Supplier.GetModel(model.Supplier_id);
                if (supplier == null)
                {
                    supplier = new Lebi_Supplier();
                }
                torder          = new Lebi_Transport_Order();
                torder.Code     = RequestTool.RequestSafeString("Code");
                torder.Order_id = model.id;

                torder.T_Address     = model.T_Address;
                torder.T_Email       = model.T_Email;
                torder.T_MobilePhone = model.T_MobilePhone;
                torder.T_Name        = model.T_Name;
                torder.T_Phone       = model.T_Phone;
                //torder.Transport_Code = model.Transport_Code;
                //torder.Transport_id = model.Transport_id;
                torder.Transport_Name   = RequestTool.RequestSafeString("Transport_Name");
                torder.User_id          = model.User_id;
                torder.Supplier_id      = supplier.id;
                torder.Supplier_SubName = supplier.SubName;
                List <TransportProduct>   tps = new List <TransportProduct>();
                TransportProduct          tp;
                List <Lebi_Order_Product> pros = B_Lebi_Order_Product.GetList("Order_id=" + model.id + "", "");

                foreach (Lebi_Order_Product pro in pros)
                {
                    tp                = new TransportProduct();
                    tp.Count          = pro.Count;
                    tp.ImageBig       = pro.ImageBig;
                    tp.ImageMedium    = pro.ImageMedium;
                    tp.ImageOriginal  = pro.ImageOriginal;
                    tp.ImageSmall     = pro.ImageSmall;
                    tp.Product_Number = pro.Product_Number;
                    tp.Product_id     = pro.Product_id;
                    tp.Product_Name   = pro.Product_Name;
                    tps.Add(tp);

                    pro.Count_Shipped = pro.Count;

                    B_Lebi_Order_Product.Update(pro);
                }

                JavaScriptSerializer jss = new JavaScriptSerializer();
                torder.Product = jss.Serialize(tps);
                torder.Type_id_TransportOrderStatus = 220;//默认状态:在途
                B_Lebi_Transport_Order.Add(torder);
                model.IsShipped     = 1;
                model.IsShipped_All = 1;

                B_Lebi_Order.Update(model);
            }
            Response.Write("{\"msg\":\"OK\"}");
        }