Exemplo n.º 1
0
        /// <summary>
        /// 查询销售单详细分页
        /// </summary>
        /// <returns></returns>
        public ActionResult GetDetailList()
        {
            string CompanyID = WebUtil.GetFormValue <string>("CompanyID");

            int PageIndex = WebUtil.GetFormValue <int>("PageIndex", 1);
            int PageSize  = WebUtil.GetFormValue <int>("PageSize", 10);

            string OrderSnNum = WebUtil.GetFormValue <string>("OrderSnNum");
            string OrderNum   = WebUtil.GetFormValue <string>("OrderNum");
            int    OrderType  = WebUtil.GetFormValue <int>("OrderType", 0);
            string CusName    = WebUtil.GetFormValue <string>("CusName", string.Empty);
            string CusNum     = WebUtil.GetFormValue <string>("CusNum", string.Empty);
            string Phone      = WebUtil.GetFormValue <string>("Phone", string.Empty);

            int Status       = WebUtil.GetFormValue <int>("Status", 0);
            int AuditeStatus = WebUtil.GetFormValue <int>("AuditeStatus", 0);

            string ContractOrder = WebUtil.GetFormValue <string>("ContractOrder", string.Empty);
            string CusOrderNum   = WebUtil.GetFormValue <string>("CusOrderNum", string.Empty);

            string BarCode     = WebUtil.GetFormValue <string>("BarCode", string.Empty);
            string ProductName = WebUtil.GetFormValue <string>("ProductName", string.Empty);

            string BeginTime = WebUtil.GetFormValue <string>("BeginTime", string.Empty);
            string EndTime   = WebUtil.GetFormValue <string>("EndTime", string.Empty);

            SaleDetailEntity entity = new SaleDetailEntity();

            entity.CompanyID    = CompanyID;
            entity.OrderSnNum   = OrderSnNum;
            entity.OrderNum     = OrderNum;
            entity.CusName      = CusName;
            entity.CusNum       = CusNum;
            entity.Phone        = Phone;
            entity.Status       = Status;
            entity.AuditeStatus = AuditeStatus;

            entity.ContractOrder = ContractOrder;
            entity.CusOrderNum   = CusOrderNum;
            entity.BarCode       = BarCode;
            entity.ProductName   = ProductName;
            entity.BeginTime     = BeginTime;
            entity.EndTime       = EndTime;

            PageInfo pageInfo = new PageInfo()
            {
                PageIndex = PageIndex, PageSize = PageSize
            };
            Bill <SaleOrderEntity, SaleDetailEntity> bill = new SaleOrder(CompanyID);
            List <SaleDetailEntity>           listResult  = bill.GetDetailList(entity, ref pageInfo);
            DataListResult <SaleDetailEntity> dataResult  = new DataListResult <SaleDetailEntity>()
            {
                Code     = (int)EResponseCode.Success,
                Message  = "响应成功",
                Result   = listResult,
                PageInfo = pageInfo
            };

            return(Content(JsonHelper.SerializeObject(dataResult)));
        }