public IActionResult DrawBack_Add() { M_OrderList orderMod = orderBll.SelReturnModel(Mid); if (!DrawBackCheck(orderMod, ref err)) { return(WriteErr(err)); } string text = RequestEx["Back_T"]; if (text.Length < 10) { return(WriteErr("退款说明最少需十个字符")); } //------------------------ M_Order_Back backMod = new M_Order_Back(); backMod.OrderID = orderMod.id; backMod.OrderBak = JsonConvert.SerializeObject(orderMod); backMod.UserRemind = text; backMod.UserID = mu.UserID; backMod.ID = backBll.Insert(backMod); DBCenter.UpdateSQL(orderMod.TbName, "BackID=" + backMod.ID + ",OrderStatus=" + (int)M_OrderList.StatusEnum.DrawBack, "ID=" + orderMod.id); return(Content("<script>top.location=top.location;</script>")); }
public int Insert(M_Order_Back model) { return(DBCenter.Insert(model)); }
public bool UpdateByID(M_Order_Back model) { return(DBCenter.UpdateByID(model, model.ID)); }
protected void Page_Load(object sender, EventArgs e) { B_ARoleAuth.AuthCheckEx(ZLEnum.Auth.shop, "order"); if (Mid < 1 && string.IsNullOrEmpty(Request["OrderNo"])) { function.WriteErrMsg("未指定订单"); } if (Mid > 0) { orderinfo = oll.GetOrderListByid(Mid); } else if (!string.IsNullOrEmpty(Request["OrderNo"])) { orderinfo = oll.GetByOrder(Request["OrderNo"], "0"); } if (orderinfo == null || orderinfo.id < 1) { function.WriteErrMsg("订单不存在"); } EmailDR = SnsHelper.SelEmailInfo(orderinfo.id); conMod = conBll.SelModelByOid(orderinfo.id); if (!IsPostBack) { OrderNO = orderinfo.OrderNo; //---------------------------------------------------------- M_UserInfo mu = buser.SelReturnModel(orderinfo.Userid); M_Payment payMod = GetPayment(orderinfo); HeadTitle_L.Text = "订 单 信 息(订单编号:" + orderinfo.OrderNo + ")"; string giveurl = customPath2 + "User/Userexp.aspx?UserID=" + orderinfo.Userid + "&orderid=" + orderinfo.id; give_score_a.HRef = giveurl + "&type=" + (int)M_UserExpHis.SType.Point; give_purse_a.HRef = giveurl + "&type=" + (int)M_UserExpHis.SType.Purse; //Reuser.Text = StringHelper.SubStr(orderinfo.Receiver, 12); //UName_L.Text = "<a href='javascript:;' onclick='showuinfo(" + mu.UserID + ");' title='查看用户'>" + mu.UserName + "</a>"; if (orderinfo.StateLogistics != 0) { Exp_Send_Btn.Enabled = false; } if (orderinfo.StateLogistics == 1) { Exp_ClientSign_Btn.Enabled = true; } //if (orderinfo.StateLogistics == 0) { function.Script(this, "hiddLogistics();"); } if (orderinfo.Paymentstatus >= (int)M_OrderList.PayEnum.HasPayed) { Paymentstatus.Text = "<span style='color:green';>已经汇款</span>"; Pay_Has_Btn.Disabled = true; } else { Paymentstatus.Text = "<span style='color:red;'>等待汇款</span>"; Pay_Has_Btn.Disabled = false; Exp_Send_Btn.Enabled = false; } switch ((M_OrderList.StatusEnum)orderinfo.OrderStatus) { case M_OrderList.StatusEnum.Normal: break; case M_OrderList.StatusEnum.DrawBack: OS_NoSure_Btn.Enabled = false; Exp_Send_Btn.Enabled = false; CompleteOrder_Btn.Enabled = false; Back_Btn.Visible = true; break; case M_OrderList.StatusEnum.UnDrawBack: case M_OrderList.StatusEnum.CheckDrawBack: OS_Invoice_Btn.Enabled = false; OS_NoSure_Btn.Enabled = false; Exp_Send_Btn.Enabled = false; CompleteOrder_Btn.Enabled = false; break; case M_OrderList.StatusEnum.OrderFinish: //case M_OrderList.StatusEnum.UnitFinish: CompleteOrder_Btn.Enabled = false; break; default: break; } OS_Sure_Btn.Enabled = orderinfo.IsSure == 1 ? false : true; #region 物流信息 ExpStatus_L.Text = OrderHelper.GetExpStatus(orderinfo.StateLogistics); M_Order_Exp expMod = expBll.SelReturnModel(DataConverter.CLng(orderinfo.ExpressNum)); if (expMod != null) { ExpName_L.Text = expMod.ExpComp; ExpCode_L.Text = expMod.ExpNo; ExpStatus_L.Text += "(公司:" + expMod.ExpComp + "/单号:" + expMod.ExpNo + ")"; SearchExp_A.Visible = true; SearchExp_A.HRef = "http://www.17track.net/zh-cn/track?nums=" + expMod.ExpNo; } switch ((M_OrderList.ExpEnum)orderinfo.StateLogistics) { case M_OrderList.ExpEnum.NoSend: Exp_Cancel_Btn.Enabled = false; ExpPrint_B.Disabled = true; break; case M_OrderList.ExpEnum.HasSend: Exp_ClientSign_Btn.Enabled = true; break; case M_OrderList.ExpEnum.HasReceived: Exp_Send_Btn.Enabled = false; break; } if (orderinfo.BackID > 0) { M_Order_Back backMod = backBll.SelReturnModel(orderinfo.BackID); Back_UserRemind_L.Text = backMod.UserRemind; Back_AdminRemind_L.Text = backMod.AdminRemind; Back_ZStatus_L.Text = backBll.GetZStatus(backMod.ZStatus); } //Phone.Text = orderinfo.Phone.ToString();//联系电话 //ZipCode.Text = orderinfo.ZipCode.ToString();//邮政编码 //Mobile.Text = orderinfo.MobileNum;//手机 //Reusers.Text = orderinfo.Receiver.ToString();//订货人 //Jiedao.Text = orderinfo.Shengfen + " " + orderinfo.Jiedao;//地址 #endregion ExpTime_L.Text = orderinfo.ExpTime; OrderStatus.Text = OrderHelper.GetOrderStatus(orderinfo.OrderStatus); OrderType_L.Text = orderinfo.AddTime.ToString(); Invoiceneeds.Text = orderinfo.Invoiceneeds == 1 ? ComRE.Icon_OK : ComRE.Icon_Error; Developedvotes.Text = orderinfo.Developedvotes == 1 ? ComRE.Icon_OK : ComRE.Icon_Error; IsSure_L.Text = orderinfo.IsSure == 1 ? ComRE.Icon_OK : ComRE.Icon_Error; OS_Freeze_Btn.Enabled = orderinfo.Suspended == 1; OS_Pause_Btn.Enabled = orderinfo.Suspended == 1 ? false : true; //暂停 if (orderinfo.Aside == 1) //已作废 { Pay_Has_Btn.Disabled = true; //ShowSend_Btn.Enabled = false; OS_Sure_Btn.Enabled = false; OS_NoSure_Btn.Enabled = false; CompleteOrder_Btn.Enabled = false; Exp_ClientSign_Btn.Enabled = false; OS_Freeze_Btn.Enabled = false; OS_Invoice_Btn.Enabled = false; OS_Pause_Btn.Enabled = false; OS_Aside_Btn.Enabled = false; Pay_Cancel_Btn.Enabled = false; Refund_B.Attributes["disabled"] = "disabled"; } else { OS_Aside_Btn.Enabled = true; } if (orderinfo.Settle == 1) { //ShowSend_Btn.Enabled = false; OS_Sure_Btn.Enabled = false; OS_NoSure_Btn.Enabled = false; OS_Aside_Btn.Enabled = false; Exp_ClientSign_Btn.Enabled = false; OS_Invoice_Btn.Enabled = false; OS_Pause_Btn.Enabled = false; } if (orderinfo.Settle == 1 || string.IsNullOrEmpty(orderinfo.PaymentNo)) { Pay_Settle_Btn.Disabled = true; } //显示支付平台信息,订单完成支付后才有值 if (!string.IsNullOrEmpty(orderinfo.PaymentNo) && payMod != null)//支付后才有值 { // Payment.Text = platBll.GetPayPlatName(orderinfo.PaymentNo); if (payMod.Status != (int)M_Payment.PayStatus.NoPay) { ChangeMoney_Btn.Attributes["disabled"] = "disabled"; ChangeMoney_Btn.Attributes["title"] = "已支付订单不可修改金额"; } } //Email.Text = orderinfo.Email.ToString();//电子信 //Invoice.Text = orderinfo.Invoice.ToString();//发票信息 AddUser.Text = orderinfo.AddUser.ToString(); //负责跟单人员 Internalrecords_T.Text = orderinfo.Internalrecords.ToString(); //内部记录 Ordermessage_T.Text = orderinfo.Ordermessage; //订货留言 //-------购物车 //DataTable cplist = cartProBll.GetCartProOrderID(Mid); DataTable cplist = SnsHelper.SelCart(Mid); Procart_RPT.DataSource = cplist; Procart_RPT.DataBind(); //------- #region 金额总计和修改 double orderMoney = orderinfo.Ordersamount - orderinfo.Freight; PI_OrdersMoney_T.Text = orderMoney.ToString("F2"); PI_OrderExpMoney_T.Text = orderinfo.Freight.ToString("F2"); PI_OrderTotal_T.Text = orderinfo.Ordersamount.ToString("F2"); if (payMod != null) { PI_NeedPay_L.Text = payMod.MoneyReal.ToString("F2"); PI_Arrive_L.Text = payMod.ArriveMoney.ToString("F2"); PI_Point_L.Text = payMod.UsePoint.ToString("F0") + "个(" + payMod.UsePointArrive.ToString("F2") + "元)"; PI_Order_L.Text = orderMoney.ToString("F2"); PI_Freight_L.Text = orderinfo.Freight.ToString("F2"); //PI_Total_L.Text = orderinfo.Ordersamount.ToString("F2"); } else { PI_NeedPay_L.Text = orderinfo.Ordersamount.ToString("F2"); } PI_ReceMoney_L.Text = orderinfo.Receivablesamount.ToString("f2") + "元"; #endregion #region 判断订单所处状态 { if (orderinfo.OrderStatus < (int)M_OrderList.StatusEnum.Normal || orderinfo.Aside == 1) { prog_order_div.InnerHtml = OrderHelper.GetOrderStatus(orderinfo.OrderStatus, orderinfo.Aside, orderinfo.StateLogistics); } else { int current = 2; if (orderinfo.OrderStatus >= (int)M_OrderList.StatusEnum.OrderFinish) { current = 5; } else if (orderinfo.Paymentstatus >= (int)M_OrderList.PayEnum.HasPayed) { current++; switch (orderinfo.StateLogistics) { case (int)M_OrderList.ExpEnum.HasSend: current++; break; case (int)M_OrderList.ExpEnum.HasReceived: current += 2; break; } } function.Script(this, "$('#prog_order_div').ZLSteps('订单生成,等待用户支付,等待商户发货,等待用户签收,订单完结'," + current + ")"); } } #endregion } }