/// <summary> /// 申请返款 /// </summary> /// <param name="context"></param> public void SubmitRebates(HttpContext context) { string orderId = context.Request["orderId"]; if (string.IsNullOrEmpty(orderId)) { context.Response.Write("{\"msg\":\"没有可以提交的销售单。\",\"success\":\"false\"}"); return; } var order = new BLL.Order(); string result = ""; foreach (string s in orderId.Split(new char[] { ',' })) { if (order.SubmitOrders(s, order.GetOrderByPKID(orderId).CustomerID.ToString()).Length > 0) { result += "不可提交"; } else if (!CommonFunction.CheckOrderAttach(int.Parse(orderId), "attachRequireSale")) { result += "电子资料不全。具体要求查看在线帮助。"; } else { result += order.SubmitRebates(orderId); } } result = (result.Length > 0) ? "部分销售单不能申请返款。可能以下情况:<BR>1.被禁止申请返款;2.已提交过<BR>3.未填写交车记录;4.车型不符合返款规定;5.电子资料不全" : ""; context.Response.Write("{\"msg\":\" " + result + "\",\"success\":\"false\"}"); }