/// <summary>
 /// 查询已配完信息或者部分配货信息
 /// </summary>
 /// <param name="packgecode"></param>
 /// <param name="ispacked"></param>
 /// <returns></returns>
 public ActionResult SearchIspack(string packgecode, int ispacked, int pageSize, int pageIndex = 1)
 {
     DBModel.Common.ComResult res = new DBModel.Common.ComResult();
     //包裹号不为空的情况下,需要判断包裹号在系统中是否存在
     if (!string.IsNullOrEmpty(packgecode))
     {
         bool isok = _service.IsPackgeInSys(packgecode);
         if (!isok)
         {
             res.Msg   = "输入的包裹号在系统中不存在,请确认";
             res.State = 0;
             return(Json(res));
         }
     }
     try
     {
         int packgecount           = 0;
         int count                 = 0;
         List <PrintSelect> list   = _service.GetPrintSelectList(packgecode, ispacked, pageSize, pageIndex, out packgecount, out count);
         MyPageList         mylist = new MyPageList();
         mylist.list      = list;
         mylist.pageCount = packgecount;
         mylist.count     = count;
         mylist.pageIndex = pageIndex;
         mylist.pageSize  = pageSize;
         return(Json(mylist));
     }
     catch (Exception ex)
     {
         res.State = 0;
         res.Msg   = ex.Message;
         return(Json(res));
     }
 }
Exemple #2
0
        public ActionResult GetLSpage(int shopID)//string pagenum, string onepagecount,
        {
            ComResult com = new ComResult();

            try
            {
                //if (!Regex.IsMatch(pagenum, @"^\+?[1-9][0-9]*$") && !string.IsNullOrEmpty(pagenum))
                //{
                //    com.Msg = "只能是数字";
                //    com.State = 0;
                //    return Json(com);
                //}
                //if (!Regex.IsMatch(onepagecount, @"^\+?[1-9][0-9]*$") && !string.IsNullOrEmpty(onepagecount))
                //{
                //    com.Msg = "只能是数字";
                //    com.State = 0;
                //    return Json(com);
                //}
                if (!Regex.IsMatch(shopID.ToString(), @"^\+?[1-9][0-9]*$") && !string.IsNullOrEmpty(shopID.ToString()))
                {
                    com.Msg   = "只能是数字";
                    com.State = 0;
                    return(Json(com));
                }
                if (string.IsNullOrEmpty(shopID.ToString()))
                {
                    com.Msg   = "没有选择店铺";
                    com.State = 0;
                    return(Json(com));
                }
                int totil = 0;
                //int totilpage = 0;
                string     exmsg    = string.Empty;
                var        PSKUlist = _service.SearchLStable(shopID, out totil, out exmsg);
                MyPageList pagelist = new MyPageList();
                pagelist.count = totil;
                pagelist.list  = PSKUlist;
                //pagelist.pageCount = packgecount;
                //pagelist.pageIndex = pageIndex;
                //pagelist.pageSize = pageSize;
                return(Json(pagelist));

                //LSOrderViewmodel mypkskulist = new LSOrderViewmodel();
                //mypkskulist.PSKUlist = PSKUlist;
                //mypkskulist.totilcount = totil.ToString();
                ////mypkskulist.totilpage = totilpage.ToString();
                //com.State = 1;
                //com.DataResult = mypkskulist;
                //return Json(com);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 /// <summary>
 /// 查询快递类型包裹是否导出
 /// </summary>
 /// <param name="expressid"></param>
 /// <param name="ispacked"></param>
 /// <param name="pageSize"></param>
 /// <param name="pageIndex"></param>
 /// <returns></returns>
 public ActionResult Serachpacket(int expressid, int ispacked, int pageSize, DateTime?starttime, DateTime?endtime, int pageIndex = 1)
 {
     DBModel.Common.ComResult res = new DBModel.Common.ComResult();
     try
     {
         int packgecount = 0;
         int count       = 0;
         List <ExpressPackgeModel> list = _service.GetExpressPackgeList(expressid, ispacked, pageSize, pageIndex, out packgecount, out count, starttime, endtime);
         MyPageList pagelist            = new MyPageList();
         pagelist.count     = count;
         pagelist.list      = list;
         pagelist.pageCount = packgecount;
         pagelist.pageIndex = pageIndex;
         pagelist.pageSize  = pageSize;
         return(Json(pagelist));
     }
     catch (Exception ex)
     {
         res.State = 0;
         res.Msg   = ex.Message;
         return(Json(res));
     }
 }