accounts.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. use think\facade\Route;
  12. use app\common\middleware\AdminAuthMiddleware;
  13. use app\common\middleware\AdminTokenMiddleware;
  14. use app\common\middleware\AllowOriginMiddleware;
  15. use app\common\middleware\LogMiddleware;
  16. Route::group(function () {
  17. //分账商户
  18. Route::group('system/applyments', function () {
  19. Route::get('lst', '/lst')->name('systemMerchantApplymentsLst')->option([
  20. '_alias' => '分账商户申请列表',
  21. ]);
  22. Route::get('detail/:id', '/detail')->name('systemMerchantApplymentsDetail')->option([
  23. '_alias' => '分账商户申请详情',
  24. ]);
  25. Route::post('status/:id', '/switchWithStatus')->name('systemMerchantApplymentsStatus')->option([
  26. '_alias' => '分账商户申请审核',
  27. ]);
  28. Route::get('merchant/:id', '/getMerchant')->name('systemMerchantApplymentsGet')->option([
  29. '_alias' => '分账商户审核查询',
  30. '_auth' => false,
  31. ]);
  32. Route::get('mark/:id/form', '/markForm')->name('systemMerchantApplymentsMarrk')->option([
  33. '_alias' => '分账商户申请备注表单',
  34. '_form' => 'systemMerchantApplymentsMarrkSave',
  35. '_auth' => false,
  36. ]);
  37. Route::post('mark/:id', '/mark')->name('systemMerchantApplymentsMarrkSave')->option([
  38. '_alias' => '分账商户申请备注',
  39. ]);
  40. })->prefix('admin.system.merchant.MerchantApplyments')->option([
  41. '_path' => '/merchant/applyments',
  42. '_auth' => true,
  43. ]);
  44. //分账单
  45. Route::group('profitsharing', function () {
  46. Route::get('lst', '/getList')->name('systemOrderProfitsharingLst')->option([
  47. '_alias' => '列表',
  48. ]);
  49. Route::post('again/:id', '/again')->name('systemOrderProfitsharingAgain')->option([
  50. '_alias' => '重新分账',
  51. ]);
  52. Route::get('export', '/export')->name('systemOrderProfitsharingExport')->option([
  53. '_alias' => '导出'
  54. ]);
  55. })->prefix('admin.order.OrderProfitsharing')->option([
  56. '_path' => '/merchant/applyList',
  57. '_auth' => true,
  58. '_append'=> [
  59. [
  60. '_name' =>'systemStoreExcelLst',
  61. '_path' =>'/merchant/applyList',
  62. '_alias' => '导出列表',
  63. '_auth' => true,
  64. ],
  65. [
  66. '_name' =>'systemStoreExcelDownload',
  67. '_path' =>'/merchant/applyList',
  68. '_alias' => '导出下载',
  69. '_auth' => true,
  70. ],
  71. ]
  72. ]);
  73. Route::group('profitsharing', function () {
  74. Route::get('config', '/getProfitsharing')->name('systemOrderProfitsharingGetConfig')->option([
  75. '_alias' => '配置信息',
  76. ]);
  77. Route::post('config', '/setProfitsharing')->name('systemOrderProfitsharingSetConfig')->option([
  78. '_alias' => '配置保存',
  79. ]);
  80. })->prefix('admin.system.config.ConfigOthers')->option([
  81. '_path' => '/accounts/settings',
  82. '_auth' => true,
  83. '_doc' => '分账',
  84. ]);
  85. //提现
  86. Route::group('user/extract', function () {
  87. Route::get('lst', 'UserExtract/lst')->name('systemUserExtractLst')->option([
  88. '_alias' => '申请列表',
  89. ]);
  90. Route::post('status/:id', 'UserExtract/switchStatus')->name('systemUserExtractSwitchStatus')->option([
  91. '_alias' => '审核',
  92. ]);
  93. Route::get('export', 'UserExtract/export')->name('systemUserExtractExport')->option([
  94. '_alias' => '导出',
  95. ]);
  96. })->prefix('admin.user.')->option([
  97. '_path' => '/accounts/extract',
  98. '_auth' => true,
  99. '_append'=> [
  100. [
  101. '_name' =>'systemStoreExcelLst',
  102. '_path' =>'/accounts/extract',
  103. '_alias' => '导出列表',
  104. '_auth' => true,
  105. '_repeat' => true,
  106. ],
  107. [
  108. '_name' =>'systemStoreExcelDownload',
  109. '_path' =>'/accounts/extract',
  110. '_alias' => '导出下载',
  111. '_auth' => true,
  112. '_repeat' => true,
  113. ],
  114. ]
  115. ]);
  116. Route::group('receipt', function () {
  117. Route::get('lst', '/getList')->name('systemOrderReceiptList')->option([
  118. '_alias' => '列表',
  119. ]);
  120. Route::get('detail/:id', '/detail')->name('systemOrderReceiptDetail')->option([
  121. '_alias' => '详情',
  122. ]);
  123. })->prefix('merchant.store.order.OrderReceipt')->option([
  124. '_path' => '/accounts/receipt',
  125. '_auth' => true,
  126. ]);
  127. //充值
  128. Route::group('user/recharge', function () {
  129. Route::get('list', 'UserRecharge/getList')->name('systemUserRechargeList')->option([
  130. '_alias' => '列表',
  131. ]);
  132. Route::get('total', 'UserRecharge/total')->name('systemUserRechargeTotal')->option([
  133. '_alias' => '统计',
  134. ]);
  135. })->prefix('admin.user.')->option([
  136. '_path' => '/accounts/bill',
  137. '_auth' => true,
  138. '_doc' => '充值管理',
  139. ]);
  140. //余额变动记录
  141. Route::group('bill', function () {
  142. Route::get('list', 'UserBill/getList')->name('systemUserBillList')->option([
  143. '_alias' => '列表',
  144. ]);
  145. Route::get('type', 'UserBill/type')->option([
  146. '_alias' => '类型',
  147. '_auth' => false,
  148. ]);
  149. Route::get('export', 'UserBill/export')->name('systemUserBillExport')->option([
  150. '_alias' => '导出',
  151. ]);
  152. })->prefix('admin.user.')->option([
  153. '_path' => '/accounts/capital',
  154. '_auth' => true,
  155. '_append'=> [
  156. [
  157. '_name' =>'systemStoreExcelLst',
  158. '_path' =>'/accounts/capital',
  159. '_alias' => '导出列表',
  160. '_auth' => true,
  161. '_repeat' => true,
  162. ],
  163. [
  164. '_name' =>'systemStoreExcelDownload',
  165. '_path' =>'/accounts/capital',
  166. '_alias' => '导出下载',
  167. '_auth' => true,
  168. '_repeat' => true,
  169. ],
  170. ]
  171. ]);
  172. //账单管理
  173. Route::group('financial_record', function () {
  174. Route::get('lst', '/getList')->name('systemFinancialRecordLst')->option([
  175. '_alias' => '列表',
  176. ]);
  177. Route::get('title', '/getTitle')->name('systemFinancialRecordTitle')->option([
  178. '_alias' => '统计',
  179. ]);
  180. Route::get('detail/:type', '/detail')->name('systemFinancialRecordDetail')->option([
  181. '_alias' => '详情',
  182. ]);
  183. Route::get('detail_export/:type', '/exportDetail')->name('systemFinancialRecordDetailExport')->option([
  184. '_alias' => '导出',
  185. ]);
  186. })->prefix('admin.system.merchant.FinancialRecord')->option([
  187. '_path' => '/accounts/statement',
  188. '_auth' => true,
  189. '_append'=> [
  190. [
  191. '_name' =>'systemStoreExcelLst',
  192. '_path' =>'/accounts/statement',
  193. '_alias' => '导出列表',
  194. '_auth' => true,
  195. ],
  196. [
  197. '_name' =>'systemStoreExcelDownload',
  198. '_path' =>'/accounts/statement',
  199. '_alias' => '导出下载',
  200. '_auth' => true,
  201. ],
  202. ]
  203. ]);
  204. //资金流水
  205. Route::group('financial_record', function () {
  206. Route::get('list', '/lst')->name('systemFinancialRecordList')->option([
  207. '_alias' => '列表',
  208. ]);
  209. Route::get('export', '/export')->name('systemFinancialRecordExport')->option([
  210. '_alias' => '导出',
  211. ]);
  212. Route::get('count', '/title')->name('systemFinancialCount')->option([
  213. '_alias' => '统计',
  214. ]);
  215. })->prefix('admin.system.merchant.FinancialRecord')->option([
  216. '_path' => '/accounts/capitalFlow',
  217. '_auth' => true,
  218. '_append'=> [
  219. [
  220. '_name' =>'systemStoreExcelLst',
  221. '_path' =>'/accounts/capitalFlow',
  222. '_alias' => '导出列表',
  223. '_auth' => true,
  224. ],
  225. [
  226. '_name' =>'systemStoreExcelDownload',
  227. '_path' =>'/accounts/capitalFlow',
  228. '_alias' => '导出下载',
  229. '_auth' => true,
  230. ],
  231. ]
  232. ]);
  233. //财务
  234. Route::group('financial', function () {
  235. //申请转账
  236. Route::get('lst', 'Financial/lst')->name('systemFinancialList')->option([
  237. '_alias' => '列表',
  238. ]);
  239. Route::get('detail/:id', 'Financial/detail')->name('systemFinancialDetail')->option([
  240. '_alias' => '详情',
  241. ]);
  242. Route::post('update/:id', 'Financial/update')->name('systemFinancialUpdate')->option([
  243. '_alias' => '编辑',
  244. ]);
  245. Route::post('status/:id', 'Financial/switchStatus')->name('systemFinancialSwitchStatus')->append(['type' => 0])->option([
  246. '_alias' => '修改状态',
  247. ]);
  248. Route::get('mark/:id/form', 'Financial/markForm')->name('systemFinancialMarkForm')->option([
  249. '_alias' => '备注表单',
  250. '_form' => 'systemFinancialMark',
  251. '_auth' => false,
  252. ]);
  253. Route::post('mark/:id', 'Financial/mark')->name('systemFinancialMark')->option([
  254. '_alias' => '备注',
  255. ]);
  256. Route::get('title', 'Financial/title')->name('systemFinancialTitle')->option([
  257. '_alias' => '统计',
  258. ]);
  259. Route::get('export', 'Financial/export')->name('systemFinancialExport')->option([
  260. '_alias' => '导出',
  261. ]);
  262. })->prefix('admin.system.financial.')->option([
  263. '_path' => '/accounts/transferRecord',
  264. '_auth' => true,
  265. '_append'=> [
  266. [
  267. '_name' =>'systemStoreExcelLst',
  268. '_path' =>'/accounts/transferRecord',
  269. '_alias' => '导出列表',
  270. '_auth' => true,
  271. ],
  272. [
  273. '_name' =>'systemStoreExcelDownload',
  274. '_path' =>'/accounts/transferRecord',
  275. '_alias' => '导出下载',
  276. '_auth' => true,
  277. ],
  278. ]
  279. ]);
  280. })->middleware(AllowOriginMiddleware::class)
  281. ->middleware(AdminTokenMiddleware::class, true)
  282. ->middleware(AdminAuthMiddleware::class)
  283. ->middleware(LogMiddleware::class);