Example #1
0
 public function view_searchpicture()
 {
     $starttime = $_POST['startdate'] ? $_POST['startdate'] : '';
     $endtime = $_POST['enddate'] ? $_POST['enddate'] : "";
     $scanuser = $_POST['scanuser'] ? $_POST['scanuser'] : "";
     $pictype = $_POST['pic_type'];
     $pic_status = $_POST['pic_status'];
     $auditUser = $_POST['userName'] ? $_POST['userName'] : "";
     $ordersn = $_POST['ordersn'] ? $_POST['ordersn'] : "";
     $limit = $_POST['limit'] ? $_POST['limit'] : "";
     $pictureAct = new PictureAuditAct();
     if (!empty($starttime)) {
         $starttime = strtotime($starttime);
     }
     if (!empty($endtime)) {
         $endtime = strtotime($endtime);
     }
     if ($ordersn != "") {
         //订单号不为空,则根据订单号搜索,搜索条件只需为ordersn 和 图片状态
         if ($pic_status == 0 || $pic_status == 1) {
             //合格和不合格状态直接拿本系统的数据
             $srcArr = $pictureAct->act_getPicturelocal($ordersn, "", "", "", "", "", "");
         }
         if ($pic_status == 2) {
             //未评分状态通过开发系统取erp中的数据
             $srcArr = $pictureAct->act_getPicture($ordersn, "", "", "", "", "", "");
         }
     } else {
         if ($pic_status == 0 || $pic_status == 1) {
             //合格和不合格状态直接拿本系统的数据
             $srcArr = $pictureAct->act_getPicturelocal("", $starttime, $endtime, $scanuser, $pictype, $pic_status, $limit);
         }
         if ($pic_status == 2) {
             //未评分状态通过开发系统取erp中的数据
             $srcArr = $pictureAct->act_getPicture("", $starttime, $endtime, $scanuser, $pictype, $pic_status, $limit);
         }
     }
     $navlist = array(array('url' => 'index.php?mod=skuStock&act=searchSku', 'title' => '库存管理'), array('url' => 'index.php?mod=pictureAudit&act=showpicturehistory', title => "历史查询"), array('url' => '', 'title' => '图片审核'));
     $audited = isset($srcArr['audited']) ? $srcArr['audited'] : 0;
     unset($srcArr['audited']);
     $unaudit = count($srcArr);
     $this->smarty->assign('audited', $audited);
     $this->smarty->assign('unaudit', $unaudit);
     $this->smarty->assign('navlist', $navlist);
     $this->smarty->assign('toptitle', '图片审核');
     $this->smarty->assign('toplevel', 0);
     $this->smarty->assign('secondlevel', '05');
     $this->smarty->assign('srcArr', $srcArr);
     //$this->smarty->assign("ebay_id",$ebay_id);
     $this->smarty->display("showpicture.htm");
 }