set(2, 1)->getList($this->id); $html = ''; if ($data && $data['order']) { foreach ($data['order'] as $k => $v) { if ($v['ps_info']) { $ps_date = $v['ps_info']['cdate']; $ydate = $v['ps_info']['ydate'] ? $v['ps_info']['ydate'] : '-'; } else { $ps_date = $ydate = '-'; } $view = Dever::url('order_view?type=3&order_id=' . $v['id'], 'store'); $send = Dever::url('order_send?id=' . $v['id'], 'store'); $button = ''; $print = Dever::url('admin/order.print?id=' . $v['id'] . '&type=2', 'store'); $button .= '  '; if ($v['status'] == 4) { $url = Dever::url('admin/factory_order.action_commit&order_id='.$v['id'], 'store'); $button .= '  '; } if ($v['refund_status'] == 2 && $v['status'] != 8) { $v['status_name'] .= '[缺货报损中]'; } $html .= ''.$v['order_num'].''.$ps_date.''.$v['source_info']['name'].''.$ydate.''.$v['num'].''.$v['status_name'].''.$button.''; } } return $html; } # 获取列表页搜索信息 public function getSearch() { $config = array ( array('value' => '0', 'name' => '全部'), array('value' => 4, 'name' => '待收货确认'), array('value' => '5,6', 'name' => '已完成'), array('value' => 'refund', 'name' => '缺货与报损'), ); $status = Dever::input('status'); $html = ''; foreach ($config as $k => $v) { $selected = ''; if ((!$status && $k == 0) || $status == $v['value']) { $selected = 'selected=""'; } $html .= ''; } return $html; } # 获取列表页搜索信息 public function getService() { $service = Dever::db('shop/service')->select(); $html = ''; foreach ($service as $k => $v) { $selected = ''; if ($k == 0) { $selected = 'selected=""'; } $html .= ''; } return $html; } # 获取基本信息 public function getConfig() { $data['search'] = Dever::url('factory_order', 'store'); # 确认收货 $data['action'] = Dever::url('admin/factory_order.action_commit', 'store'); return $data; } # 确认收货 public function action_commit_api() { $order_id = Dever::input('order_id'); Dever::load('mshop/lib/buy')->set(2,1)->finish($this->id, $order_id); return 'reload'; } }