Exemplo n.º 1
0
        /// <summary>
        /// 保存
        /// </summary>
        private void Save()
        {
            string[] hidIncome     = Utils.GetFormValues("hidIncome");
            string[] txtRealIncome = Utils.GetFormValues("txtRealIncome");
            string[] hidOrderId    = Utils.GetFormValues("hidOrderId");


            EyouSoft.Model.TourStructure.MTourOrderSales model = new EyouSoft.Model.TourStructure.MTourOrderSales();
            model.Operator                   = this.SiteUserInfo.Name;
            model.OperatorId                 = this.SiteUserInfo.UserId;
            model.CollectionRefundState      = EyouSoft.Model.EnumType.TourStructure.CollectionRefundState.收款;
            model.CollectionRefundDate       = System.DateTime.Now;
            model.CollectionRefundOperator   = this.SiteUserInfo.Name;
            model.CollectionRefundOperatorID = this.SiteUserInfo.UserId;
            model.IsGuideRealIncome          = true;

            EyouSoft.BLL.TourStructure.BTourOrder bll = new EyouSoft.BLL.TourStructure.BTourOrder();

            for (int i = 0; i < hidIncome.Length; i++)
            {
                model.OrderId = hidOrderId[i];
                decimal income = Utils.GetDecimal(hidIncome[i]);
                model.CollectionRefundAmount = Utils.GetDecimal(txtRealIncome[i]);
                bll.UpdateGuideRealIncome(model.OrderId, income, model.CollectionRefundAmount, "", model);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// init rpt
        /// </summary>
        void InitRpt()
        {
            pageIndex = UtilsCommons.GetPadingIndex();
            var chaXun = GetChaXunInfo();

            object[] heJi;

            IList <MTradeOrder> list = new EyouSoft.BLL.TourStructure.BTourOrder().GetTourOrderList(chaXun, pageSize, pageIndex, ref recordCount, out heJi);

            if (list != null && list.Count > 0)
            {
                this.rptList.DataSource = list;
                this.rptList.DataBind();
                BindPage();

                ltrHeJi0.Text = recordCount.ToString();
                ltrHeJi1.Text = heJi[0].ToString();
                ltrHeJi2.Text = heJi[1].ToString();
                ltrHeJi3.Text = UtilsCommons.GetMoneyString(heJi[2], ProviderToMoney);
            }
            else
            {
                this.lblMsg.Text = "没有相关数据!";
                this.ExporPageInfoSelect1.Visible = false;
                this.ExporPageInfoSelect2.Visible = false;

                phHeJi.Visible = false;
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 获取座位人数
        /// </summary>
        /// <param name="orderid"></param>
        /// <returns></returns>
        private string GetPeopleNum(string orderid)
        {
            EyouSoft.BLL.TourStructure.BTourOrder         bll        = new EyouSoft.BLL.TourStructure.BTourOrder();
            EyouSoft.Model.TourStructure.MTourOrderExpand orderModel = bll.GetTourOrderExpandByOrderId(orderid);
            int peonum = 0;

            if (orderModel != null)
            {
                peonum = orderModel.Adults + orderModel.Childs;
            }
            return(peonum.ToString());
        }
Exemplo n.º 4
0
        /// <summary>
        /// 初始化导游收入
        /// </summary>
        /// <param name="tourId">团队编号</param>
        private void TourGuideMoneyIn(string tourId)
        {
            EyouSoft.Model.TourStructure.MOrderSum          sum    = new EyouSoft.Model.TourStructure.MOrderSum();
            IList <EyouSoft.Model.TourStructure.MTourOrder> orders = new EyouSoft.BLL.TourStructure.BTourOrder().GetTourOrderListById(ref sum, tourId);

            //导游报账 导游收入列表绑定
            if (orders != null && orders.Count > 0)
            {
                repGuidInMoney.DataSource = orders;
                repGuidInMoney.DataBind();
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 导游收入是否保存
        /// </summary>
        /// <param name="orderid"></param>
        /// <returns></returns>
        protected bool IsBaoCunDaoYouShouRu(object orderid)
        {
            bool retCode = false;

            var bllRetCode = new EyouSoft.BLL.TourStructure.BTourOrder().GetBaoCunDaoYouShouRuStatus(orderid.ToString());

            if (bllRetCode == 2)
            {
                retCode = true;
            }

            return(retCode);
        }
Exemplo n.º 6
0
 private void PageInitForOrder(string orderID)
 {
     EyouSoft.BLL.TourStructure.BTourOrder         bll        = new EyouSoft.BLL.TourStructure.BTourOrder();
     EyouSoft.Model.TourStructure.MTourOrderExpand orderModel = bll.GetTourOrderExpandByOrderId(orderID);
     if (orderModel != null)
     {
         this.lblOrderNum.Text       = orderModel.OrderCode;
         this.ltrBuyCompanyName.Text = orderModel.BuyCompanyName;
         txtHeTongHao.HeTongId       = orderModel.ContractId;
         txtHeTongHao.HeTongCode     = orderModel.ContractCode;
     }
     else
     {
         Utils.ResponseGoBack();
     }
 }
Exemplo n.º 7
0
 /// <summary>
 /// 是否显示查看链接
 /// </summary>
 /// <param name="orderid"></param>
 /// <param name="tourid"></param>
 /// <returns></returns>
 protected string GetIsShow(object orderid, object tourid)
 {
     EyouSoft.BLL.TourStructure.BTour           bll   = new EyouSoft.BLL.TourStructure.BTour();
     EyouSoft.Model.TourStructure.MTourBaseInfo model = bll.GetTourInfo(Convert.ToString(tourid));
     System.Text.StringBuilder str = new System.Text.StringBuilder();
     if (model != null)
     {
         if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼短线)
         {
             EyouSoft.BLL.TourStructure.BTourOrder bllorder = new EyouSoft.BLL.TourStructure.BTourOrder();
             IList <EyouSoft.Model.TourStructure.MTourOrderSeatInfo> list = bllorder.GetTourOrderSeatInfo(tourid.ToString());
             if (list != null && list.Count > 0)
             {
                 str.AppendFormat("<a href='javascript:void(0);' data-class='showCarModel' data-peonum='{0}' data-tourid='{1}' data-orderid='{2}'>查看</a>", GetPeopleNum(Convert.ToString(orderid)), Convert.ToString(tourid), Convert.ToString(orderid));
             }
         }
     }
     return(str.ToString());
 }
Exemplo n.º 8
0
        /// <summary>
        /// to xls
        /// </summary>
        void ToXls()
        {
            int toXlsRecordCount = UtilsCommons.GetToXlsRecordCount();

            if (toXlsRecordCount < 1)
            {
                ResponseToXls(string.Empty);
            }

            int _recordCount = 0;

            var chaXun = GetChaXunInfo();

            object[] heJi;
            var      items = new EyouSoft.BLL.TourStructure.BTourOrder().GetTourOrderList(chaXun, toXlsRecordCount, 1, ref _recordCount, out heJi);

            if (items == null || items.Count == 0)
            {
                ResponseToXls(string.Empty);
            }


            StringBuilder s = new StringBuilder();

            s.Append("线路名称\t订单号\t下单人\t销售员\t客源单位\t人数\t合计金额\t状态\t下单时间\t订单备注\n");

            foreach (var item in items)
            {
                s.Append(item.RouteName + "\t");
                s.Append(item.OrderCode + "\t");
                s.Append(item.Operator + "\t");
                s.Append(item.SellerName + "\t");
                s.Append(item.BuyCompanyName + "\t");
                s.Append(item.Adults + "+" + item.Childs + "\t");
                s.Append(item.ConfirmMoney.ToString("F2") + "\t");
                s.Append(item.OrderStatus + "\t");
                s.Append(item.IssueTime.Value.ToString("yyyy-MM-dd HH:mm") + "\t");
                s.Append(item.DingDanBeiZhu.Replace("\t", "    ").Replace("\r\n", "    ") + "\n");
            }

            ResponseToXls(s.ToString());
        }
Exemplo n.º 9
0
        /// <summary>
        /// 团队收入
        /// </summary>
        /// <param name="tourID">团号</param>
        protected void GetOrderListByTourId(string tourID)
        {
            EyouSoft.Model.TourStructure.MOrderSum          orders    = new EyouSoft.Model.TourStructure.MOrderSum();
            IList <EyouSoft.Model.TourStructure.MTourOrder> tourOrder = new EyouSoft.BLL.TourStructure.BTourOrder().GetTourOrderListById(ref orders, tourID);

            if (tourOrder != null && tourOrder.Count > 0)
            {
                this.repTourMoneyInList.DataSource = tourOrder;
                this.repTourMoneyInList.DataBind();
                this.repOrderList.DataSource = tourOrder;
                this.repOrderList.DataBind();
                this.litConfirmMoneyCount.Text           = EyouSoft.Common.UtilsCommons.GetMoneyString(orders.ConfirmMoney, ProviderToMoney);
                this.litConfirmSettlementMoneyCount.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(orders.ConfirmSettlementMoney, ProviderToMoney);
                this.litProfitCount.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(orders.Profit, ProviderToMoney);
            }
            else
            {
                this.labTourMsg.Text             = "暂无数据!";
                this.labOrderMsg.Text            = "暂无数据!";
                this.trCountView.Visible         = false;
                this.trSanPingOrderCount.Visible = true;
                this.trTourCountMsg.Visible      = true;
            }
        }
Exemplo n.º 10
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        private void DataInit()
        {
            string b = Utils.GetQueryStringValue("mark");

            switch (b)
            {
            case "1":
                this.lblMsg.Text = "提交成功!";
                break;

            case "2":
                this.lblMsg.Text = "提交失败!";
                break;

            case "3":
                this.lblMsg.Text = "保存成功!";
                break;
            }
            string tourId = Utils.GetQueryStringValue("tourId");
            BPlan  bll    = new BPlan();

            //团队支出
            IList <MPlanBaseInfo> list = bll.GetList(tourId);

            if (list != null && list.Count > 0)
            {
                rptList.DataSource = list;
                rptList.DataBind();
                this.litFrist.Text = "&nbsp;&nbsp;&nbsp;&nbsp;<span>类型</span>&nbsp;-&nbsp;<span>名称</span>&nbsp;-&nbsp;<span>结算费用</span>";
            }
            else
            {
                this.litFrist.Text = "暂无支出!";
            }

            //导游收入
            EyouSoft.Model.TourStructure.MOrderSum          sum    = new EyouSoft.Model.TourStructure.MOrderSum();
            IList <EyouSoft.Model.TourStructure.MTourOrder> orders = new EyouSoft.BLL.TourStructure.BTourOrder().GetTourOrderListById(ref sum, tourId);

            if (orders != null && orders.Count > 0)
            {
                repGuidInMoney.DataSource = orders;
                repGuidInMoney.DataBind();
                this.litSecond.Text = "&nbsp;&nbsp;&nbsp;&nbsp;<span>客源单位</span>&nbsp;-&nbsp;<span>团款现收</span>";
            }
            else
            {
                this.litSecond.Text = "暂无收入!";
            }

            //导游借款
            IList <MDebit> ls = new EyouSoft.BLL.FinStructure.BFinance().GetDebitLstByTourId(tourId, true);

            if (ls != null && ls.Count > 0)
            {
                this.rptDebit.DataSource = ls;
                this.rptDebit.DataBind();
                this.litThird.Text = "&nbsp;&nbsp;&nbsp;&nbsp;<span>姓名</span>&nbsp;-&nbsp;<span>日期</span>&nbsp;-&nbsp;<span>金额</span>";
            }
            else
            {
                this.litThird.Text = "暂无借款!";
            }

            //报账汇总
            MBZHZ model = bll.GetBZHZ(tourId);

            if (model != null)
            {
                lbl_guidesIncome.Text        = UtilsCommons.GetMoneyString(model.GuideIncome, ProviderToMoney);
                lbl_guidesBorrower.Text      = UtilsCommons.GetMoneyString(model.GuideBorrow, ProviderToMoney);
                lbl_guidesSpending.Text      = UtilsCommons.GetMoneyString(model.GuideOutlay, ProviderToMoney);
                lbl_replacementOrReturn.Text = UtilsCommons.GetMoneyString(model.GuideMoneyRtn, ProviderToMoney);
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// 保存
        /// </summary>
        protected void PageSave()
        {
            /*
             #region 表单取值
             * string msg = "";
             * bool result = false;
             * Response.Clear();
             * string orderId = Utils.GetQueryStringValue("orderId");
             * //合同号
             * string contractCode = Utils.GetFormValue(txtHeTongHao.HeTongCodeClientID);
             * string contractCodeId = Utils.GetFormValue(txtHeTongHao.HeTongIdClientID);
             #endregion
             *
             #region 表单验证
             * if (string.IsNullOrEmpty(orderId))
             * {
             *  msg += "未找到您要设置的订单!";
             * }
             * if (string.IsNullOrEmpty(contractCode))
             * {
             *  msg += "请输入合同号!";
             * }
             * if (!string.IsNullOrEmpty(msg))
             * {
             *  result = false;
             *  Response.Write("{\"result\":\"" + result + "\",\"msg\":\"" + msg + "\"}");
             *  Response.End();
             *  return;
             * }
             #endregion
             *
             #region 提交回应
             * int i = new EyouSoft.BLL.TourStructure.BTourOrder().UpdateTourOrderContaract(orderId,contractCode,contractCodeId);
             * if (i ==0)
             * {
             *  result = false;
             *  msg = "登记失败!";
             * }
             * if (i == 1)
             * {
             *  result = true;
             *  msg = "登记成功!";
             * }
             * Response.Clear();
             * Response.Write("{\"result\":\"" + result + "\",\"msg\":\"" + msg + "\"}");
             * Response.End();
             #endregion
             */

            string dingDanId = Utils.GetQueryStringValue("orderId");
            string heTongId  = Utils.GetFormValue(txtHeTongHao.HeTongIdClientID);

            if (string.IsNullOrEmpty(dingDanId))
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:异常请求"));
            }
            if (string.IsNullOrEmpty(heTongId))
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:请录入合同号"));
            }

            int bllRetCode = new EyouSoft.BLL.TourStructure.BTourOrder().SheZhiDingDanHeTong(CurrentUserCompanyID, dingDanId, heTongId);

            if (bllRetCode == 1)
            {
                RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功"));
            }
            else
            {
                RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败"));
            }
        }
Exemplo n.º 12
0
        protected void InitPage(string tourId)
        {
            //核算单
            MTourBaseInfo model = new BTour().GetTourInfo(tourId);

            if (model != null)
            {
                this.lbRouteName.Text = model.RouteName;
                this.lbTourCode.Text  = model.TourCode;
                this.lbLDate.Text     = model.LDate.HasValue ? model.LDate.Value.ToString("yyyy-MM-dd") : "";
                this.lbTourDays.Text  = model.TourDays.ToString();
                this.lbPersonNum.Text = string.Format("<b class=fontblue>{0}</b><sup class=fontred>+{1}</sup>", model.Adults, model.Childs);
                this.lbSeller.Text    = model.SaleInfo.Name;
                if (model.GuideList != null && model.GuideList.Count > 0)
                {
                    this.lbGuid.Text = UtilsCommons.PingGuide(model.GuideList);
                }
                if (model.TourPlaner != null && model.TourPlaner.Count > 0)
                {
                    this.lbTourPlaner.Text = UtilsCommons.PingPlaner(model.TourPlaner);
                }
            }
            //团款收入
            EyouSoft.Model.TourStructure.MOrderSum          orders    = new EyouSoft.Model.TourStructure.MOrderSum();
            IList <EyouSoft.Model.TourStructure.MTourOrder> tourOrder = new EyouSoft.BLL.TourStructure.BTourOrder().GetTourOrderListById(ref orders, tourId);

            if (tourOrder != null && tourOrder.Count > 0)
            {
                this.rpt_tuankuan.DataSource = tourOrder;
                this.rpt_tuankuan.DataBind();
                this.lbConfirmMoneyCount.Text    = UtilsCommons.GetMoneyString(orders.ConfirmMoney, ProviderToMoney);
                this.lbSettlementMoneyCount.Text = UtilsCommons.GetMoneyString(orders.ConfirmSettlementMoney, ProviderToMoney);
                this.lbGuideIncomeCount.Text     = UtilsCommons.GetMoneyString(orders.GuideRealIncome, ProviderToMoney);
                this.lbCheckMoneyCount.Text      = UtilsCommons.GetMoneyString(orders.ConfirmMoney - orders.GuideRealIncome, ProviderToMoney);
                this.lbProfitCount.Text          = UtilsCommons.GetMoneyString(orders.Profit, ProviderToMoney);
            }
            else
            {
                this.ph_tuankuan.Visible = false;
            }
            //其他收入
            IList <MOtherFeeInOut> otherList = new EyouSoft.BLL.PlanStructure.BPlan().GetOtherIncome(tourId);

            if (otherList != null && otherList.Count > 0)
            {
                this.rpt_qita.DataSource = otherList;
                this.rpt_qita.DataBind();
            }
            else
            {
                this.ph_qita.Visible = false;
            }
            //团队支出
            IList <EyouSoft.Model.PlanStructure.MPlanBaseInfo> payList = new EyouSoft.BLL.PlanStructure.BPlan().GetList(tourId);

            if (payList != null && payList.Count > 0)
            {
                this.rpt_zhichu.DataSource = payList;
                this.rpt_zhichu.DataBind();
                int     Count      = 0;
                decimal TotalMoney = 0;
                foreach (var item in payList)
                {
                    Count      += item.Num;
                    TotalMoney += item.Confirmation;
                }
                //this.lbNumCount.Text = Count.ToString();
                this.lbSettlementMoney.Text = UtilsCommons.GetMoneyString(TotalMoney, ProviderToMoney);
            }
            else
            {
                this.ph_zhichu.Visible = false;
            }
            //利润分配
            IList <MProfitDistribute> profitList = new EyouSoft.BLL.FinStructure.BFinance().GetProfitDistribute(tourId);

            if (profitList != null && profitList.Count > 0)
            {
                this.rpt_lirun.DataSource = profitList;
                this.rpt_lirun.DataBind();
            }
            else
            {
                this.ph_lirun.Visible = false;
            }
            //报帐汇总
            MBZHZ BZmodel = new EyouSoft.BLL.PlanStructure.BPlan().GetBZHZ(tourId);

            if (model != null)
            {
                this.lb_guidesIncome.Text        = UtilsCommons.GetMoneyString(BZmodel.GuideIncome, ProviderToMoney);
                this.lb_guidesBorrower.Text      = UtilsCommons.GetMoneyString(BZmodel.GuideBorrow, ProviderToMoney);
                this.lb_guidesSpending.Text      = UtilsCommons.GetMoneyString(BZmodel.GuideOutlay, ProviderToMoney);
                this.lb_replacementOrReturn.Text = UtilsCommons.GetMoneyString(BZmodel.GuideMoneyRtn, ProviderToMoney);
                this.lb_RCSN.Text = BZmodel.GuideRelSign.ToString();
                this.lb_HUSN.Text = BZmodel.GuideUsed.ToString();
                this.lb_RSN.Text  = BZmodel.GuideSignRtn.ToString();
            }
            //团队汇总信息
            EyouSoft.Model.PlanStructure.MTourTotalInOut tourModel = new EyouSoft.BLL.PlanStructure.BPlan().GetTourTotalInOut(tourId);
            /*团队收入*/
            this.lb_tourMoneyIn.Text = UtilsCommons.GetMoneyString(tourModel.TourIncome + tourModel.QiTaShouRu, ProviderToMoney);
            /*团队支出*/
            this.lb_tourMoneyOut.Text = UtilsCommons.GetMoneyString(tourModel.TourOutlay, ProviderToMoney);
            /*团队利润*/
            this.lb_tourMoney.Text = UtilsCommons.GetMoneyString(tourModel.TourProfit, ProviderToMoney);
            /*团队利润率*/
            this.lb_tourMoneyRate.Text = tourModel.TourProRate.ToString("F2") + "%";
        }