|
@@ -7,6 +7,7 @@ use app\common\library\MobileConstant;
|
|
|
use app\common\model\Attachment;
|
|
|
use app\common\model\Mobile;
|
|
|
use app\common\model\MobileOrder;
|
|
|
+use app\common\service\MobileOrderExport;
|
|
|
use app\common\service\Refund;
|
|
|
use app\common\service\SmsSend;
|
|
|
use app\common\validate\RefundValidate;
|
|
@@ -48,13 +49,26 @@ class Order extends SubCommon
|
|
|
}
|
|
|
public function index(){
|
|
|
$data=input();
|
|
|
+ $page=input('page',1);
|
|
|
+ $limit=input('limit',15);
|
|
|
+ $export=input('export');
|
|
|
$model=new MobileOrder();
|
|
|
|
|
|
+ if(!empty($data['order_no'])){
|
|
|
+ $model->where('order_no',$data['order_no']);
|
|
|
+ }
|
|
|
+
|
|
|
$list=$model
|
|
|
->with(['info'])
|
|
|
->where('s_id',$this->auth->id)
|
|
|
- ->order('id','desc')
|
|
|
- ->paginate();
|
|
|
+ ->order('id','desc');
|
|
|
+
|
|
|
+ $list=$list->paginate($limit,false);
|
|
|
+
|
|
|
+ if($export){
|
|
|
+ return MobileOrderExport::export($list);
|
|
|
+ }
|
|
|
+
|
|
|
$this->assign('list',$list);
|
|
|
$this->assign('pay_type',$model::$payTypes);
|
|
|
$this->assign('status',$model::$status);
|