/// <summary> /// 根据订单的编号、收款类型获取销售收款、退款列表 /// </summary> /// <param name="orderId">订单编号</param> /// <param name="collectionRefundState">收款类型</param> /// <returns></returns> public IList <MTourOrderSales> GetTourOrderSalesListByOrderId(string orderId, CollectionRefundState collectionRefundState) { if (string.IsNullOrEmpty(orderId)) { throw new System.Exception("bll error:查询orderIds为null。string.IsNullOrEmpty(id)==true."); } return(dal.GetTourOrderSalesListByOrderId(orderId, collectionRefundState)); }
/// <summary> /// 获取参数并验证 /// </summary> /// <param name="model">赋值实体</param> /// <param name="msg">验证提示语</param> /// <returns></returns> private bool GetVal(MTourOrderSales model, out string msg) { msg = string.Empty; model = model ?? new MTourOrderSales(); CollectionRefundState ReturnOrSet = ShouTuiType == "1" ? CollectionRefundState.收款 : CollectionRefundState.退款; model.CollectionRefundDate = Utils.GetDateTime(Utils.GetFormValue("txt_collectionRefundDate")); if (model.CollectionRefundDate == DateTime.MinValue) { msg += ReturnOrSet + "时间不能为空!<br/>"; } //收退款金额 model.CollectionRefundAmount = Utils.GetDecimal(Utils.GetFormValue("txt_collectionRefundAmount")); if (model.CollectionRefundAmount <= 0) { msg += ReturnOrSet + "金额格式不正确!<br/>"; } //收退款方式 model.CollectionRefundMode = Utils.GetIntSign(Utils.GetFormValue("sel_collectionRefundMode"), -1); if (model.CollectionRefundMode < 0) { msg += ReturnOrSet + "方式异常!<br/>"; } if (Utils.GetFormValue("sellsFormKey").Length > 0) { //收退款人 model.CollectionRefundOperator = Request.Form[txt_Sells.SellsNameClient] ?? Utils.GetFormValue(Utils.GetFormValue("sellsFormKey") + txt_Sells.SellsNameClient); //收退款人ID model.CollectionRefundOperatorID = Request.Form[txt_Sells.SellsIDClient] ?? Utils.GetFormValue(Utils.GetFormValue("sellsFormKey") + txt_Sells.SellsIDClient); } if (model.CollectionRefundOperator.Length <= 0 || model.CollectionRefundOperatorID.Length <= 0) { msg += ReturnOrSet + "人异常,请单击选用按钮选取!<br/>"; } //退款类型 model.CollectionRefundState = ReturnOrSet; //备注 model.Memo = Utils.GetFormValue("txt_Memo"); //订单号 model.OrderId = Utils.GetFormValue("OrderId"); model.Operator = SiteUserInfo.Name; model.OperatorId = SiteUserInfo.UserId; return(msg.Length <= 0); }