| | |
| | | LF_OrderFileBLL _lF_OrderFileBLL = null; |
| | | EC_OrderBLL _eC_OrderBLL = null; |
| | | OA_KaipiaoshenqingBLL oA_KaipiaoshenqingBLL = null; |
| | | |
| | | /// <summary> |
| | | /// 初始化构造 |
| | | /// </summary> |
| | |
| | | private void Accept() |
| | | { |
| | | Response.Clear(); |
| | | PayAbout payAbout = new PayAbout(); |
| | | payAbout.LoadNewestPaymentAccount(true); |
| | | double? commission = MyConvert.ConvertToDouble(CY.Config.WebInfo.Instance.FirmOrderAgencyFee); |
| | | int? orderId = string.IsNullOrEmpty(Request["id"]) ? null : MyConvert.ConvertToInt32(Request["id"]); |
| | | if (!orderId.HasValue || !commission.HasValue) |
| | | |
| | | |
| | | var orderId = string.IsNullOrEmpty(Request["id"]) ? Guid.Empty : MyConvert.ConvertToGuid(Request["id"]); |
| | | if ( orderId == Guid.Empty) |
| | | { |
| | | Response.Write("-2"); |
| | | return; |
| | | } |
| | | |
| | | |
| | | |
| | | var a_Kaipiaoshenqing = oA_KaipiaoshenqingBLL.GetModelByKeyid(orderId); |
| | | |
| | | if (a_Kaipiaoshenqing !=null ) |
| | | { |
| | | if(a_Kaipiaoshenqing.Kaipiaoshenqing == 3) |
| | | { |
| | | Response.Write("已开票,无法撤回!"); |
| | | return; |
| | | } |
| | | if(a_Kaipiaoshenqing.Shenqingleixing == "订单开票") |
| | | { |
| | | Dictionary<int, object> searchParam = new Dictionary<int, object>(); |
| | | |
| | | SetParamValue(searchParam, 1, CurrentUser.MemberId); |
| | | SetParamValue(searchParam, 2, ""); |
| | | SetParamValue(searchParam, 3, ""); |
| | | SetParamValue(searchParam, 4, ""); |
| | | SetParamValue(searchParam, 5, ""); |
| | | SetParamValue(searchParam, 6, ""); |
| | | SetParamValue(searchParam, 7, ""); |
| | | SetParamValue(searchParam, 8, ""); |
| | | SetParamValue(searchParam, 9, ""); |
| | | SetParamValue(searchParam, 10, ""); |
| | | SetParamValue(searchParam, 11, ""); |
| | | SetParamValue(searchParam, 12, ""); |
| | | SetParamValue(searchParam, 13, ""); |
| | | SetParamValue(searchParam, 14, ""); |
| | | SetParamValue(searchParam, 15, ""); |
| | | SetParamValue(searchParam, 16, ""); |
| | | SetParamValue(searchParam, 18, 0); |
| | | SetParamValue(searchParam, 19, CurrentUser.TrueMemberId); |
| | | SetParamValue(searchParam, 20, CurrentUser.StaffId); |
| | | SetParamValue(searchParam, 21, CurrentUser.TrueName); |
| | | SetParamValue(searchParam, 22, ""); |
| | | SetParamValue(searchParam, 23, ""); |
| | | SetParamValue(searchParam, 24, ""); |
| | | SetParamValue(searchParam, 25, ""); |
| | | SetParamValue(searchParam, 26, a_Kaipiaoshenqing.Keyid); |
| | | SetParamValue(searchParam, 29, ""); |
| | | |
| | | |
| | | |
| | | SearchParam = searchParam; |
| | | |
| | | |
| | | |
| | | Infrastructure.Query.Pagination pagination = new Infrastructure.Query.Pagination() |
| | | { |
| | | PageSize = 1000, |
| | | PageIndex = 1 |
| | | }; |
| | | IEnumerable<EC_OrderBasic> result = _eC_OrderBasicBLL.SelectModelPage_Seller(pagination, SearchParam); |
| | | |
| | | var PayedMoney = result.Sum(x => x.TradingSingle.PayedMoney); |
| | | if (PayedMoney.HasValue && PayedMoney > 0) |
| | | { |
| | | Response.Write("已经有回款记录,无法撤回!"); |
| | | return; |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | if (a_Kaipiaoshenqing.Kehumoney.HasValue && a_Kaipiaoshenqing.Kehumoney.Value > 0) |
| | | { |
| | | Response.Write("已经有回款记录,无法撤回!"); |
| | | return; |
| | | } |
| | | |
| | | } |
| | | var sss = oA_KaipiaoshenqingBLL.DeleteModel(a_Kaipiaoshenqing); |
| | | if (!sss) |
| | | { |
| | | Response.Write("撤回失败!"); |
| | | return; |
| | | } |
| | | if (a_Kaipiaoshenqing.Shenqingleixing == "订单开票") |
| | | { |
| | | EC_OrderExtend model = new EC_OrderExtend(); |
| | | model.KaipiaoshenqingId = a_Kaipiaoshenqing.Keyid; |
| | | model.KaipiaoshenqingTime = null; |
| | | model.Kaipiaoshenqing = 2; |
| | | model.KaipiaoshenqingCreater = Guid.Empty; |
| | | |
| | | sss = _eC_OrderBLL.NewUpdateKaipiaoshenqings(model); |
| | | |
| | | if (!sss) |
| | | { |
| | | Response.Write("撤回失败!"); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | else |
| | | { |
| | | Response.Write("撤回失败!"); |
| | | return; |
| | | } |
| | | Response.Write(_eC_OrderBasicBLL.AcceptOrder(orderId.Value, commission.Value) ? "1" : "0"); |
| | | |
| | | |
| | | |
| | | |
| | | Response.Write( "1"); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | this.selKaipiaoshenqing.DataSource = _sys_DictionaryBLL.GetDataByType("EC_开票申请"); |
| | | this.selKaipiaoshenqing.DataBind(); |
| | | this.selKaipiaoshenqing.Items.Insert(0, new ListItem("全部", "")); |
| | | //this.selKaipiaoshenqing.Value = "1"; |
| | | |
| | | //this.selPayStates.Value = "1"; |
| | | //this.selHuikuanStates.Value = "1"; |
| | | |
| | | |
| | | |
| | | this.selBusinessManager.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, true, false); |
| | |
| | | this.selBusinessManager.Items.Insert(0, new ListItem("全部", "")); |
| | | //this.selBusinessManager.Items.Insert(1, new ListItem(CurrentUser.ShortName, CurrentUser.ShortName)); |
| | | |
| | | this.txtSQBeginDate.Value = DateTime.Now.AddDays(-14).ToString("yyyy-MM-dd"); |
| | | this.txtSQEndDate.Value = DateTime.Now.ToString("yyyy-MM-dd"); |
| | | //this.txtSQBeginDate.Value = DateTime.Now.AddDays(-14).ToString("yyyy-MM-dd"); |
| | | //this.txtSQEndDate.Value = DateTime.Now.ToString("yyyy-MM-dd"); |
| | | |
| | | //初次数据加载 |
| | | btn_Search_Click(btn_Search, new EventArgs()); |
| | |
| | | PageSize = UCPager1.AspNetPager.PageSize, |
| | | PageIndex = UCPager1.AspNetPager.CurrentPageIndex |
| | | }; |
| | | IEnumerable<OA_Kaipiaoshenqing> result = oA_KaipiaoshenqingBLL.SelectModelPage(pagination, CurrentUser.MemberId, this.txtSQBeginDate.Value, this.txtSQEndDate.Value, this.selKaipiaoshenqing.Value, this.selKehuqianshou.Value, this.selBusinessManager.Value, this.txtCustormerName.Value); |
| | | IEnumerable<OA_Kaipiaoshenqing> result = oA_KaipiaoshenqingBLL.SelectModelPage(pagination, CurrentUser.MemberId, this.txtSQBeginDate.Value, this.txtSQEndDate.Value, this.selKaipiaoshenqing.Value, this.selKehuqianshou.Value, this.selBusinessManager.Value, this.txtCustormerName.Value, this.selPayStates.Value, this.selHuikuanStates.Value ); |
| | | rptData.DataSource = result; |
| | | rptData.DataBind(); |
| | | |