12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace app\admin\controller\after_sale;
-
- use app\common\basics\AdminBase;
- use app\common\server\JsonServer;
- use app\common\model\Freight;
- use app\common\model\after_sale\AfterSale as AfterSaleModel;
- use app\admin\logic\after_sale\AfterSaleLogic;
- use think\exception\ValidateException;
-
-
- class AfterSale extends AdminBase
- {
-
-
- public function lists()
- {
- if ($this->request->isAjax()) {
- $get = $this->request->get();
- return JsonServer::success('', AfterSaleLogic::list($get));
- }
- $data = AfterSaleLogic::list();
-
- $status = AfterSaleModel::getStatusDesc(true);
- $status = AfterSaleLogic::getStatus($status);
- $all = AfterSaleLogic::getAll();
- return view('', [
- 'data' => $data,
- 'all' => $all,
- 'status' => $status
- ]);
- }
-
-
-
- public function detail()
- {
- $id = $this->request->get('id');
- $detail = AfterSaleLogic::getDetail($id);
- return view('', [
- 'detail' => $detail
- ]);
- }
-
-
-
-
- public function export()
- {
- $params = $this->request->get();
- $result = AfterSaleLogic::list($params, true);
- if(false === $result) {
- return JsonServer::error(AfterSaleLogic::getError() ?: '导出失败');
- }
- return JsonServer::success('', $result);
- }
- }
|