diff --git a/app/admin/controller/merchant/system/financial/Financial.php b/app/admin/controller/merchant/system/financial/Financial.php new file mode 100644 index 0000000..2fea61b --- /dev/null +++ b/app/admin/controller/merchant/system/financial/Financial.php @@ -0,0 +1,106 @@ +getPage(); + $where = $this->request->params(['date','status','financial_type','financial_status','keyword','is_trader','mer_id']); + $where['type'] = 0; + $data = $this->repository->getAdminList($where,$page,$limit); + return app('json')->success($data); + } + + public function getMarginLst() + { + [$page, $limit] = $this->getPage(); + $where = $this->request->params(['date','status','financial_type','financial_status','keyword','is_trader','mer_id']); + $where['type'] = 1; + $data = $this->repository->getAdminList($where,$page,$limit); + return app('json')->success($data); + } + + + /** + * 显示创建资源表单页. + * + * @return \think\Response + */ + public function create() + { + // + } + + /** + * 保存新建的资源 + * + * @param \think\Request $request + * @return \think\Response + */ + public function save(Request $request) + { + // + } + + /** + * 显示指定的资源 + * + * @param int $id + * @return \think\Response + */ + public function read($id) + { + // + } + + /** + * 显示编辑资源表单页. + * + * @param int $id + * @return \think\Response + */ + public function edit($id) + { + // + } + + /** + * 保存更新的资源 + * + * @param \think\Request $request + * @param int $id + * @return \think\Response + */ + public function update(Request $request, $id) + { + // + } + + /** + * 删除指定资源 + * + * @param int $id + * @return \think\Response + */ + public function delete($id) + { + // + } +} diff --git a/app/admin/controller/merchant/system/merchant/MerchantMargin.php b/app/admin/controller/merchant/system/merchant/MerchantMargin.php index acff038..68e859b 100644 --- a/app/admin/controller/merchant/system/merchant/MerchantMargin.php +++ b/app/admin/controller/merchant/system/merchant/MerchantMargin.php @@ -56,19 +56,20 @@ class MerchantMargin extends BaseController } /** - * 显示保证金列表 + * 获取保证金列表 * - * @return \think\Response + * @return json */ public function lst(ServeOrderModel $order) { $params = get_params(); $page = empty($params['page'])? 1 : (int)$params['page']; $limit = empty($params['limit'])? (int)get_config('app . page_size') : (int)$params['limit']; - $where = ['date','keyword','is_trader','category_id','type_id']; + $where = get_params(['date','keyword','is_trader','category_id','is_margin','type_id']); $where['type'] = 10;//10==保证金 $data = $order->GetList($where, $page, $limit); + return to_assign(0,'success', $data['data']=$data['list']); } @@ -140,6 +141,10 @@ class MerchantMargin extends BaseController } + + + + /** * 保存新建的资源 * diff --git a/app/admin/route/merchant.php b/app/admin/route/merchant.php index f0c5915..e7aebe8 100644 --- a/app/admin/route/merchant.php +++ b/app/admin/route/merchant.php @@ -164,7 +164,7 @@ Route::group(function(){ // 保证金退还 Route::group('margin/refund', function(){ //退款申请 - Route::get('refund/lst', 'financial.Financial/getMarginLst')->name('systemMarginRefundList')->option([ + Route::get('lst', 'financial.Financial/getMarginLst')->name('systemMarginRefundList')->option([ '_alias' => '退款申请列表', ]); Route::get('refund/show/:id', 'financial.Financial/refundShow')->name('systemMarginRefundShow')->option([ @@ -190,5 +190,8 @@ Route::group(function(){ Route::post('refund/mark/:id', 'financial.Financial/mark')->name('systemMarginRefundMark')->option([ '_alias' => '备注', ]); - }); + })->prefix('merchant.system.financial.Financial')->option([ + '_path' => '/margin', + '_auth' => true, + ]); }); diff --git a/app/admin/view/merchant/system/merchant/margin/list.html b/app/admin/view/merchant/system/merchant/margin/list.html index 6919f65..16ddefb 100644 --- a/app/admin/view/merchant/system/merchant/margin/list.html +++ b/app/admin/view/merchant/system/merchant/margin/list.html @@ -50,7 +50,7 @@