Ejemplo n.º 1
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void DataInit()
        {
            string orderId = Utils.GetQueryStringValue("OrderId");
            IList <MTourOrderSales> items = new BTourOrder().GetTourOrderSalesListByOrderId(orderId, ShouTuiType == "1" ? CollectionRefundState.收款 : CollectionRefundState.退款);

            if (items != null && items.Count > 0)
            {
                rpt_list.DataSource = items;
                rpt_list.DataBind();
            }
            txt_Sells.SellsID   = SiteUserInfo.UserId;
            txt_Sells.SellsName = SiteUserInfo.Name;

            var info = new BTourOrder().GetOrderMoney(orderId);

            if (info != null)
            {
                lbl_listTitle.Text = "<span style=\"color:" + (info.IsConfirm ? "#000000" : "#ff0000") + "\">合同金额:" + UtilsCommons.GetMoneyString(info.ConfirmMoney, ProviderToMoney) + "</span>"
                                     + "&nbsp;&nbsp;已收金额:" + UtilsCommons.GetMoneyString(info.CheckMoney, ProviderToMoney)
                                     + "&nbsp;&nbsp;已退金额:" + UtilsCommons.GetMoneyString(info.ReturnMoney, ProviderToMoney)
                                     + "<span style=\"color:#ff0000\">&nbsp;&nbsp;已收待审:" + UtilsCommons.GetMoneyString((info.ReceivedMoney - info.CheckMoney), ProviderToMoney) + "</span>"
                                     + "<span style=\"color:#ff0000\">&nbsp;&nbsp;已退待审" + UtilsCommons.GetMoneyString((info.BackMoney - info.ReturnMoney), ProviderToMoney) + "</span>"
                                     + "<span style=\"color:#ff0000\">&nbsp;&nbsp;未收金额:" + UtilsCommons.GetMoneyString((info.ConfirmMoney - info.CheckMoney + info.ReturnMoney), ProviderToMoney) + "</span>";
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 团款收入
        /// </summary>
        /// <param name="tourId">团队编号</param>
        private void TourOrderInit(string tourId)
        {
            MOrderSum          sumModel = new MOrderSum();
            IList <MTourOrder> sl       = new BTourOrder().GetTourOrderListById(ref sumModel, tourId);

            if (sl != null && sl.Count > 0)
            {
                rpt_tourMoneyIn.DataSource = sl;
                rpt_tourMoneyIn.DataBind();
                //合同金额
                lbl_sumPrice.Text = UtilsCommons.GetMoneyString(TourIncome.Value = sumModel.ConfirmMoney.ToString(), ProviderToMoney);
                //团队收入
                lbl_tourMoneyIn.Text = (sumModel.ConfirmSettlementMoney).ToString();
                //结算金额
                lbl_confirmSettlementMoney.Text = UtilsCommons.GetMoneyString(TourSettlement.Value = (confirmSettlementMoney = sumModel.ConfirmSettlementMoney).ToString(), ProviderToMoney);
                //导游实收
                lbl_guideRealIncome.Text = UtilsCommons.GetMoneyString(sumModel.GuideRealIncome, ProviderToMoney);
                //财务实收
                lbl_checkMoney.Text = UtilsCommons.GetMoneyString(sumModel.ConfirmMoney - sumModel.GuideRealIncome, ProviderToMoney);
                //订单利润
                lbl_profit.Text = UtilsCommons.GetMoneyString(sumModel.Profit, ProviderToMoney);
                //已收金额
                ltrYiShouJinEHeJi.Text = UtilsCommons.GetMoneyString(sumModel.CheckMoney, ProviderToMoney);
                //待审金额
                ltrDaiShenJinE.Text = UtilsCommons.GetMoneyString(sumModel.DengJiJinE - sumModel.CheckMoney, ProviderToMoney);
                //未收金额
                ltrWeiShouJinE.Text = UtilsCommons.GetMoneyString(sumModel.ConfirmMoney - sumModel.CheckMoney, ProviderToMoney);
            }
            pan_tourMoneyInMsg.Visible = !(pan_tourMoneyInSum.Visible = sl != null && sl.Count > 0);//
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 退团事件
        /// </summary>
        /// <returns></returns>
        private string PageSave()
        {
            string msg = string.Empty;

            #region 获取表单
            string travellerId   = Utils.GetQueryStringValue("id");
            string travellerName = Utils.GetFormValue(this.txt_reBackName.UniqueID);
            EyouSoft.Model.EnumType.GovStructure.Gender travellerSex = Utils.GetFormValue(this.rad_Man.UniqueID) == "0" ? EyouSoft.Model.EnumType.GovStructure.Gender.男 : EyouSoft.Model.EnumType.GovStructure.Gender.女;
            DateTime leaveDate    = Utils.GetDateTime(Utils.GetFormValue(this.txt_reBackDate.UniqueID));
            decimal  reBackMoney  = Utils.GetDecimal(Utils.GetFormValue(this.txt_reBackMoney.UniqueID));
            string   reMarkMoney  = Utils.GetFormValue(this.txt_reMarkMoney.UniqueID);
            string   reBackResion = Utils.GetFormValue(this.txt_ReBackResion.UniqueID);
            string   tourId       = Utils.GetQueryStringValue("tourId");
            string   orderId      = Utils.GetQueryStringValue("orderId");
            #endregion

            #region 游客实体类
            BTourOrder          bll            = new BTourOrder();
            MTourOrderTraveller travellerModel = bll.GetTourOrderTravellerById(travellerId);
            travellerModel.TravellerId     = travellerId;
            travellerModel.TravellerStatus = EyouSoft.Model.EnumType.TourStructure.TravellerStatus.退团;
            travellerModel.RTime           = leaveDate;
            travellerModel.RAmountRemark   = reMarkMoney;
            travellerModel.RAmount         = reBackMoney;
            travellerModel.OrderId         = orderId;
            travellerModel.CnName          = travellerName;
            travellerModel.TravellerId     = travellerId;
            travellerModel.RRemark         = reBackResion;

            #endregion

            #region 订单变更表实体类
            MTourOrderChange Model_Chang = new MTourOrderChange();

            Model_Chang.CompanyId    = SiteUserInfo.CompanyId;
            Model_Chang.TourId       = tourId;
            Model_Chang.ChangePerson = 1;
            Model_Chang.ChangePrice  = reBackMoney;
            Model_Chang.IssueTime    = DateTime.Now;
            Model_Chang.Operator     = SiteUserInfo.Name;
            Model_Chang.OrderId      = travellerModel.OrderId;
            Model_Chang.Content      = "申请退团";
            #endregion

            #region 执行更改
            bool result = bll.UpdateTourOrderTraveller(travellerModel, Model_Chang);
            if (result)
            {
                msg = UtilsCommons.AjaxReturnJson("1", "退团成功!");
            }
            else
            {
                msg = UtilsCommons.AjaxReturnJson("0", "退团失败!");
            }
            return(msg);

            #endregion
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 初始化
 /// </summary>
 private void DataInit()
 {
     string[] orderIds = Utils.GetQueryStringValue("OrderId").Split(',');
     if (orderIds.Length > 0)
     {
         IList <MTourOrderCollectionSales> ls = new BTourOrder().GetTourOrderCollectionSalesListByOrderId(orderIds);
         if (ls != null && ls.Count > 0)
         {
             rpt_list.DataSource = ls;
             rpt_list.DataBind();
         }
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// 取消订单
        /// </summary>
        /// <returns></returns>
        private string Cancle()
        {
            string     msg     = string.Empty;
            string     orderId = Utils.GetFormValue("OrderId");
            BTourOrder bOrder  = new BTourOrder();

            if (bOrder.UpdateTourOrderExpand(orderId, EyouSoft.Model.EnumType.TourStructure.OrderStatus.已取消, null) == 1)
            {
                msg = UtilsCommons.AjaxReturnJson("1", "订单已取消!");
            }
            else
            {
                msg = UtilsCommons.AjaxReturnJson("0", "取消失败!");
            }

            return(msg);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 根据游客ID获取游客信息
        /// </summary>
        /// <param name="str_id">游客ID</param>
        protected void Get_Morder(string travellerId)
        {
            MTourOrderTraveller Model_Order = new BTourOrder().GetTourOrderTravellerById(travellerId);

            if (Model_Order != null)
            {
                txt_reBackName.Text = Model_Order.CnName;
                if (Model_Order.Gender == EyouSoft.Model.EnumType.GovStructure.Gender.男)
                {
                    rad_Man.Checked = true;
                }
                else
                {
                    rad_Women.Checked = true;
                }
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// 绑定数据源、分页控件
        /// </summary>
        public void BindSource()
        {
            pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);

            MSearchFinancialOrder search = new MSearchFinancialOrder();

            search.AreaId       = !string.IsNullOrEmpty(Utils.GetQueryStringValue("ddlArea")) ? Utils.GetInt(Utils.GetQueryStringValue("ddlArea")) : 0;
            search.CompanyId    = SiteUserInfo.CompanyId;
            search.CrmId        = SiteUserInfo.TourCompanyInfo.CompanyId;
            search.DCompanyName = !string.IsNullOrEmpty(Utils.GetQueryStringValue("DCompanyName")) ? Utils.GetQueryStringValue("DCompanyName") : string.Empty;
            search.Status       = !string.IsNullOrEmpty(Utils.GetQueryStringValue("ddlOrderStatus")) ? (EyouSoft.Model.EnumType.TourStructure.OrderStatus?)Utils.GetInt(Utils.GetQueryStringValue("ddlOrderStatus")) : null;

            BTourOrder order             = new BTourOrder();
            IList <MFinancialOrder> list = order.GetOrderList(search, pageSize, pageIndex, ref recordCount);

            if (list != null && list.Count > 0)
            {
                if (queryTourId != "")
                {
                    this.RtOrder.DataSource = list.Where(m => m.TourId == queryTourId).ToList();
                    this.RtOrder.DataBind();
                }
                else if (queryOrderID != "")
                {
                    this.RtOrder.DataSource = list.Where(i => i.OrderId == queryOrderID).ToList();
                    this.RtOrder.DataBind();
                }
                else
                {
                    this.RtOrder.DataSource = list;
                    this.RtOrder.DataBind();
                }
            }

            BindPage();
        }
Ejemplo n.º 8
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        private void DataInit()
        {
            string orderId = Utils.GetQueryStringValue("OrderId") == "" ? Utils.GetQueryStringValue("Id") : Utils.GetQueryStringValue("OrderId");

            if (orderId != "")
            {
                IList <MBill> sl = new BFinance().GetBillLst(orderId);
                if (sl != null && sl.Count > 0)
                {
                    rpt_list.DataSource = sl;
                    rpt_list.DataBind();
                }
                var info = new BTourOrder().GetOrderMoney(orderId);
                if (info != null)
                {
                    lbl_listTitle.Text = "应收金额:" + UtilsCommons.GetMoneyString(info.ConfirmMoney, ProviderToMoney)
                                         + "  已审开票金额:" + UtilsCommons.GetMoneyString(info.BillAmount, ProviderToMoney);
                }
            }
            else
            {
                Utils.TopRedirect();
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// 保存
        /// </summary>
        private void Save()
        {
            if (RequestType != "1" && RequestType != "2")
            {
                AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "错误的请求"));
            }
            if (ShouTuiType != "1" && ShouTuiType != "2")
            {
                AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "错误的请求"));
            }

            BTourOrder      bll    = new BTourOrder();
            MTourOrderSales model  = bll.GetTourOrderSalesById(Utils.GetFormValue("TourOrderSalesID")) ?? new MTourOrderSales();
            string          msg    = string.Empty;
            string          doType = Utils.GetQueryStringValue("doType");

            if ((doType == "Add" || doType == "Updata") && !GetVal(model, out msg))
            {
                AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "操作失败!<br/>" + msg));
            }

            switch (doType)
            {
            case "Add":
                if (!IsDengJiPrivs)
                {
                    AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "操作失败:无权限。"));
                }
                if (RequestType == "1")
                {
                    //根据系统配置配置是否需要审核
                    MComSetting comModel = new BComSetting().GetModel(CurrentUserCompanyID);
                    model.IsCheck = !comModel.FinancialIncomeReview;
                    //如果默认为不需要审核 审核人默认为当前操作人
                    if (model.IsCheck)
                    {
                        model.Approver       = SiteUserInfo.Name;
                        model.ApproverId     = SiteUserInfo.UserId;
                        model.ApproverDeptId = SiteUserInfo.DeptId;
                        model.ApproveTime    = DateTime.Now;
                    }
                }
                if (bll.AddTourOrderSales(model))
                {
                    AjaxResponse(UtilsCommons.AjaxReturnJson("1"));
                }
                else
                {
                    AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "添加失败!"));
                }
                break;

            case "Updata":
                if (!IsDengJiPrivs)
                {
                    AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "操作失败:无权限。"));
                }
                if (bll.UpdateTourOrderSales(model))
                {
                    AjaxResponse(UtilsCommons.AjaxReturnJson("1"));
                }
                else
                {
                    AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "修改失败!"));
                }
                break;

            case "Delete":
                if (!IsDengJiPrivs)
                {
                    AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "操作失败:无权限。"));
                }
                if (bll.DeleteTourOrderSales(Utils.GetFormValue("TourOrderSalesID")))
                {
                    AjaxResponse(UtilsCommons.AjaxReturnJson("1"));
                }
                else
                {
                    AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "删除失败!"));
                }
                break;

            case "ExamineV":
                if (!IsShenHePrivs)
                {
                    AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "操作失败:无权限。"));
                }
                model.Approver       = SiteUserInfo.Name;
                model.ApproverId     = SiteUserInfo.UserId;
                model.ApproverDeptId = SiteUserInfo.DeptId;
                model.ApproveTime    = DateTime.Now;
                if (new BFinance().SetTourOrderSalesCheck(model))
                {
                    AjaxResponse(UtilsCommons.AjaxReturnJson("1"));
                }
                else
                {
                    AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "审核失败!"));
                }
                break;

            default: AjaxResponse(UtilsCommons.AjaxReturnJson("-1", "错误的请求!")); break;
            }
        }