예제 #1
0
        public async Task <ActionResult> List(int?orderStateId, string keyword, DateTime?startTime, DateTime?endTime, int pageIndex = 1)
        {
            var result = await orderService.GetDeliverModelListAsync(null, orderStateId, keyword, startTime, endTime, pageIndex, pageSize);

            DeliverListViewModel res = new DeliverListViewModel();

            res.Orders      = result.Orders;
            res.PageCount   = result.PageCount;
            res.OrderStates = MyEnumHelper.GetEnumList <OrderStateEnum>().Where(s => s.id == (int)OrderStateEnum.待发货 || s.id == (int)OrderStateEnum.已发货).ToArray();
            return(Json(new AjaxResult {
                Status = 1, Data = res
            }));
        }
예제 #2
0
        public async Task <ActionResult> List(long?orderStateId, string keyword, DateTime?startTime, DateTime?endTime, int pageIndex = 1)
        {
            var result = await orderService.GetDeliverModelListAsync(null, orderStateId, keyword, startTime, endTime, pageIndex, pageSize);

            DeliverListViewModel res = new DeliverListViewModel();

            res.Orders    = result.Orders;
            res.PageCount = result.PageCount;
            List <IdNameDTO> lists = new List <IdNameDTO>();

            lists.Add(await idNameService.GetByNameAsync("待发货"));
            lists.Add(await idNameService.GetByNameAsync("已发货"));
            lists.Add(await idNameService.GetByNameAsync("退单审核"));
            res.OrderStates = lists;
            return(Json(new AjaxResult {
                Status = 1, Data = res
            }));
        }