1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace app\admin\controller;
- use app\admin\logic\OrderExchangeLogic;
- use app\BaseController;
- use think\exception\ValidateException;
- use think\facade\Config;
- use think\facade\Validate;
- class OrderExchange extends BaseController
- {
- //列表
- public function list(){
- $param = $this->request->only(['page' => 1, 'size' => 10, 'orderCode'=>'','status' => '', 'name' => '', 'username' => '','start_date'=>'','end_date'=>''], 'post');
- return OrderExchangeLogic::list($param);
- }
- //详情
- public function read(){
- $id = $this->request->post('id/d',0);
- return OrderExchangeLogic::read($id);
- }
- //导出
- public function export(){
- $param = $this->request->only(['orderCode'=>'','status' => '', 'name' => '', 'username' => '','start_date'=>'','end_date'=>''], 'post');
- return OrderExchangeLogic::export($param);
- }
- //发货
- public function deliver(){
- $list = $this->request->post('list/a', 'post');
- $val=Validate::rule(['list|发货列表'=>'require|array|length:1,100']);
- if(!$val->check(['list'=>$list])) throw new ValidateException($val->getError());
- return OrderExchangeLogic::deliver($list);
- }
- }
|