public function ordersearch() { $searchcondition = I('searchcondition', ''); $searchcontent = I('searchcontent', ''); $ossname = I('ossname', ''); if (!empty($searchcondition) && !empty($searchcontent)) { import('ORG.Util.Page'); //处理总监审核 if ($searchcondition == "inspectorverify") { if ($searchcontent == "已通过") { $searchcontent = 1; } else { $searchcontent = 0; } } //处理店长审核 if ($searchcondition == "shopleaderverify") { if ($searchcontent == "已通过") { $searchcontent = 1; } else { $searchcontent = 0; } } //处理是否打样 if ($searchcondition == "ispull") { if ($searchcontent == "要打样") { $searchcontent = 1; } else { $searchcontent = 0; } } $condition[$searchcondition] = array('like', '%' . $searchcontent . '%'); //查询条件 $condition['ossname'] = $ossname; $count = M('order')->where($condition)->count(); $page = new Page($count, 10); $limit = $page->firstRow . ',' . $page->listRows; $field = array('onum', 'reservenum', 'oscalenum', 'omname', 'ommale', 'omphone', 'bookdate', 'bookpulldate', 'bookgetdate', 'total', 'osunum', 'ispull', 'inspectorverify', 'shopleaderverify', 'opsname', 'pullok', 'pullstatus', 'goodsok', 'pullokdate', 'goodsokdate'); $order = M('order')->where($condition)->limit($limit)->field($field)->order('bookdate desc,inspectorverify,shopleaderverify')->select(); $order = subtime($order); $this->order = $order; //分配商品 $shop = D('ShopRelation')->relation('goods')->where(array('sid' => $_POST['sid']))->find(); $possess = $shop['goods']; $cloth = shopposess($possess, 1); $pants = shopposess($possess, 2); $vest = shopposess($possess, 3); $this->sid = $_POST['sid']; $this->ossname = $_POST['ossname']; $this->cloth = $cloth; $this->pants = $pants; $this->vest = $vest; $this->page = $page->show(); $this->order = $order; $this->display('order'); } }
public function ordersearch() { $searchcondition = I('searchcondition', ''); $searchcontent = I('searchcontent', ''); if (!empty($searchcondition) && !empty($searchcontent)) { import('ORG.Util.Page'); //处理总监审核 if ($searchcondition == "inspectorverify") { if ($searchcontent == "已通过") { $searchcontent = 1; } else { $searchcontent = 0; } } //处理店长审核 if ($searchcondition == "shopleaderverify") { if ($searchcontent == "已通过") { $searchcontent = 1; } else { $searchcontent = 0; } } //处理是否打样 if ($searchcondition == "ispull") { if ($searchcontent == "要打样") { $searchcontent = 1; } else { $searchcontent = 0; } } $condition[$searchcondition] = array('like', '%' . $searchcontent . '%'); $count = M('order')->where($condition)->count(); $page = new Page($count, 12); $limit = $page->firstRow . ',' . $page->listRows; $field = array('onum', 'reservenum', 'oscalenum', 'ossname', 'omname', 'ommale', 'omphone', 'bookdate', 'bookpulldate', 'bookgetdate', 'total', 'osunum', 'ispull', 'inspectorverify', 'shopleaderverify', 'opsname', 'pullok', 'pullstatus', 'goodsok', 'pullokdate', 'goodsokdate', 'repairlock'); $order = M('order')->where($condition)->limit($limit)->field($field)->order('bookdate desc,inspectorverify,shopleaderverify')->select(); $order = subtime($order); $this->order = $order; $this->display('index'); } }