store.php 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  1. <?php
  2. use app\http\middleware\AllowOriginMiddleware;
  3. use app\http\middleware\InstallMiddleware;
  4. use app\http\middleware\store\AuthTokenMiddleware;
  5. use app\http\middleware\store\StoreCkeckRoleMiddleware;
  6. use app\http\middleware\StationOpenMiddleware;
  7. use app\http\middleware\store\StoreLogMiddleware;
  8. use think\facade\Config;
  9. use think\facade\Route;
  10. use think\Response;
  11. /**
  12. * 门店路由配置
  13. */
  14. Route::group('storeapi', function () {
  15. /**
  16. * 不需要登录不验证权限
  17. */
  18. Route::group(function () {
  19. //图形验证码
  20. Route::get('ajcaptcha', 'Login/ajcaptcha')->name('ajcaptcha');
  21. //图形验证码
  22. Route::post('ajcheck', 'Login/ajcheck')->name('ajcheck');
  23. //是否需要滑块验证接口
  24. Route::post('is_captcha', 'Login/getAjCaptcha')->name('getAjCaptcha');
  25. Route::get('code', 'Test/code')->name('code')->option(['real_name' => '测试验证码']);
  26. Route::get('index', 'Test/index')->name('index')->option(['real_name' => '测试主页']);
  27. //账号密码登录
  28. Route::post('login', 'Login/login')->name('login')->option(['real_name' => '账号密码登录']);
  29. //登录信息
  30. Route::get('login/info', 'Login/info')->name('loginInfo')->option(['real_name' => '登录信息']);
  31. //图片验证码
  32. Route::get('captcha_store', 'Login/captcha')->name('captcha')->option(['real_name' => '图片验证码']);
  33. //获取版权
  34. Route::get('copyright', 'Common/getCopyright')->option(['real_name' => '获取版权']);
  35. });
  36. /**
  37. * 只需登录不验证权限
  38. */
  39. Route::group(function () {
  40. //获取logo
  41. Route::get('logo', 'Common/getLogo')->option(['real_name' => '获取logo']);
  42. //获取配置
  43. Route::get('config', 'Common/getConfig')->option(['real_name' => '获取配置']);
  44. //获取未读消息
  45. Route::get('jnotice', 'Common/jnotice')->option(['real_name' => '获取未读消息']);
  46. //获取省市区街道
  47. Route::get('city', 'Common/city')->option(['real_name' => '获取省市区街道']);
  48. //获取搜索菜单列表
  49. Route::get('menusList', 'Common/menusList')->option(['real_name' => '搜索菜单列表']);
  50. //修改当前管理员信息
  51. Route::put('update_store', 'Login/updateStore')->name('updateStore')->option(['real_name' => '修改当前登录店员信息']);
  52. //退出登录
  53. Route::get('logout', 'Login/logOut')->option(['real_name' => '退出登录']);
  54. //修改密码
  55. Route::put('updatePwd', 'staff.StoreStaff/updateStaffPwd')->option(['real_name' => '修改密码']);
  56. })->middleware(AuthTokenMiddleware::class);
  57. /**
  58. * 需登录验证权限
  59. */
  60. Route::group(function () {
  61. //首页头部统计数据
  62. Route::get('home/header', 'Common/homeStatics')->option(['real_name' => '首页头部统计数据']);
  63. //首页营业趋势图表
  64. Route::get('home/operate', 'Common/operateChart')->option(['real_name' => '首页营业趋势图表']);
  65. //首页交易图表
  66. Route::get('home/orderChart', 'Common/orderChart')->option(['real_name' => '首页交易图表']);
  67. //首页店员统计
  68. Route::get('home/staff', 'Common/staffChart')->option(['real_name' => '首页店员统计']);
  69. //轮询查询扫码订单支付状态
  70. Route::post('check_order_status/:type', 'Common/checkOrderStatus')->option(['real_name' => '轮询订单状态接口'])->name('checkOrderStatus');//轮询订单状态接口
  71. })->middleware([AuthTokenMiddleware::class, StoreCkeckRoleMiddleware::class]);
  72. /**
  73. * 基础管理
  74. */
  75. Route::group('system', function () {
  76. //获取门店菜单列表
  77. Route::get('menusList', 'system.SystemMenus/index')->option(['real_name' => '获取角色菜单列表']);
  78. //获取收银台菜单列表
  79. Route::get('cashierMenusList', 'system.SystemMenus/cashierMenusList')->option(['real_name' => '获取角色菜单列表']);
  80. //获取菜单子权限列表
  81. Route::get('sonMenusList/:role_id/:id', 'system.SystemMenus/sonMenusList')->option(['real_name' => '获取菜单子权限列表']);
  82. //管理员身份列表
  83. Route::get('role', 'system.SystemRole/index')->option(['real_name' => '管理员身份列表']);
  84. //管理员身份权限列表
  85. Route::get('role/create', 'system.SystemRole/create')->option(['real_name' => '管理员身份权限列表']);
  86. //编辑角色详情
  87. Route::get('role/:id/edit', 'system.SystemRole/edit')->option(['real_name' => '编辑角色详情']);
  88. //新建或编辑管理员
  89. Route::post('role/:id', 'system.SystemRole/save')->option(['real_name' => '新建或编辑管理员']);
  90. //修改管理员身份状态
  91. Route::put('role/set_status/:id/:status', 'system.SystemRole/set_status')->option(['real_name' => '修改管理员身份状态']);
  92. //删除管理员身份
  93. Route::delete('role/:id', 'system.SystemRole/delete')->option(['real_name' => '删除管理员身份']);
  94. //获取当前登录门店信息
  95. Route::get('store/info', 'system.Store/info')->option(['real_name' => '获取当前登录门店信息']);
  96. //修改当前登录门店信息
  97. Route::put('store/update', 'system.Store/update')->option(['real_name' => '修改当前登录门店信息']);
  98. //获取同城配送uu、达达配送商品类型
  99. Route::get('store/getBusiness/:type', 'system.Store/getBusiness')->option(['real_name' => '获取同城配送uu、达达配送商品类型']);
  100. //门店管理员资源路由
  101. Route::resource('admin', 'system.StoreAdmin')->option(['real_name' => [
  102. 'index' => '获取管理员列表',
  103. 'read' => '获取管理员详情',
  104. 'create' => '获取创建管理员表单',
  105. 'save' => '保存管理员',
  106. 'edit' => '获取修改管理员表单',
  107. 'update' => '修改管理员',
  108. 'delete' => '删除管理员'
  109. ]]);
  110. //修改管理员状态
  111. Route::put('admin/set_status/:id/:status', 'system.StoreAdmin/set_status')->option(['real_name' => '修改管理员状态']);
  112. Route::get('config/edit_new_build/:type', 'system.Config/getFormBuild')->option(['real_name' => '门店配置表单']);
  113. Route::get('config/:type', 'system.Config/getConfig')->option(['real_name' => '门店配置表单']);
  114. Route::post('config/:type', 'system.Config/save')->option(['real_name' => '保存门店配置']);
  115. Route::post('config', 'system.Config/save')->option(['real_name' => '保存门店配置']);
  116. //系统日志
  117. Route::get('log', 'system.Log/index')->name('SystemLog')->option(['real_name' => '系统日志']);
  118. //系统日志管理员搜索条件
  119. Route::get('log/search_admin', 'system.Log/search_admin')->option(['real_name' => '系统日志管理员搜索条件']);
  120. //获取系统表单信息
  121. Route::get('form/info/:id', 'system.form.SystemForm/getInfo')->option(['real_name' => '获取系统表单信息']);
  122. //获取所有系统表单
  123. Route::get('form/all_system_form', 'system.form.SystemForm/allSystemForm')->option(['real_name' => '获取所有系统表单']);
  124. //获取门店二维码
  125. Route::get('store/qrcode', 'system.Store/store_qrcode')->option(['real_name' => '获取门店二维码']);
  126. })->middleware([AuthTokenMiddleware::class, StoreCkeckRoleMiddleware::class, StoreLogMiddleware::class]);
  127. /**
  128. * 桌码管理
  129. */
  130. Route::group('table', function () {
  131. //获取餐桌座位数列表
  132. Route::get('seats/list', 'table.TableCode/getTableSeats')->option(['real_name' => '获取餐桌座位数列表']);
  133. //获取单个餐桌座位数
  134. Route::get('seats/:id', 'table.TableCode/getSeats')->option(['real_name' => '获取单个餐桌座位数']);
  135. //添加、编辑餐桌座位数
  136. Route::get('add/seats/:id', 'table.TableCode/setTableSeats')->option(['real_name' => '添加、编辑餐桌座位数']);
  137. //删除餐桌座位数
  138. Route::delete('del/seats/:id', 'table.TableCode/delTableSeats')->option(['real_name' => '删除餐桌座位数']);
  139. //获取桌码分类列表
  140. Route::get('cate/list', 'table.TableCode/getTableCodeClassify')->option(['real_name' => '获取桌码分类列表']);
  141. //获取单个桌码分类
  142. Route::get('cate/:id', 'table.TableCode/getOneClassify')->option(['real_name' => '获取单个桌码分类']);
  143. //添加、编辑桌码分类
  144. Route::get('add/cate/:id', 'table.TableCode/setTableCodeClassify')->option(['real_name' => '添加、编辑桌码分类']);
  145. //删除桌码分类
  146. Route::delete('del/cate/:id', 'table.TableCode/delTableCodeClassify')->option(['real_name' => '删除桌码分类']);
  147. //桌码添加、编辑
  148. Route::post('add/qrcode/:id', 'table.TableCode/addTableQrcode')->option(['real_name' => '桌码添加、编辑']);
  149. //获取单个桌码
  150. Route::get('qrcode/:id', 'table.TableCode/getOneTableQrcodey')->option(['real_name' => '获取单个桌码']);
  151. //删除桌码
  152. Route::delete('del/qrcode/:id', 'table.TableCode/delTableQrcodey')->option(['real_name' => '删除桌码']);
  153. //获取桌码列表
  154. Route::get('qrcodes/list', 'table.TableCode/getTableQrcodeyList')->option(['real_name' => '获取桌码列表']);
  155. //桌码操作启用
  156. Route::get('update/using/:id', 'table.TableCode/updateUsing')->option(['real_name' => '桌码操作启用']);
  157. })->middleware([AuthTokenMiddleware::class, StoreCkeckRoleMiddleware::class, StoreLogMiddleware::class]);
  158. /**
  159. * 用户
  160. */
  161. Route::group('user', function () {
  162. //门店搜索用户
  163. Route::get('search', 'user.User/search')->option(['real_name' => '门店搜索用户']);
  164. //获取指定用户的信息
  165. Route::get('one_info/:id', 'user.User/oneUserInfo')->option(['real_name' => '获取指定用户的信息']);
  166. //用户管理资源路由
  167. Route::resource('user', 'user.User')->except(['create', 'save'])->option(['real_name' => [
  168. 'index' => '获取门店用户列表',
  169. 'read' => '获取门店用户详情',
  170. 'edit' => '获取修改用户表单',
  171. 'update' => '修改用户',
  172. 'delete' => '删除用户'
  173. ]]);
  174. //用户标签分类
  175. Route::resource('user_label_cate', 'user.UserLabelCate')->option(['real_name' => [
  176. 'index' => '获取标签分类列表',
  177. 'read' => '获取标签分类详情',
  178. 'create' => '获取创建标签分类表单',
  179. 'save' => '保存标签分类',
  180. 'edit' => '获取修改标签分类表单',
  181. 'update' => '修改标签分类',
  182. 'delete' => '删除标签分类'
  183. ]]);
  184. //添加或修改用户标签
  185. Route::post('user_label/save', 'user.UserLabel/save')->option(['real_name' => '添加或修改用户标签']);
  186. //用户标签
  187. Route::resource('user_label', 'user.UserLabel')->except(['read', 'save', 'update'])->option(['real_name' => [
  188. 'index' => '获取标签列表',
  189. 'read' => '获取标签详情',
  190. 'create' => '获取创建标签表单',
  191. 'save' => '保存分类',
  192. 'edit' => '获取修改标签表单',
  193. 'update' => '修改标签',
  194. 'delete' => '删除标签'
  195. ]]);
  196. //获取用户标签
  197. Route::get('label/:uid', 'user.UserLabel/getUserLabel')->option(['real_name' => '获取用户标签']);
  198. //设置和取消用户标签
  199. Route::post('label/:uid', 'user.UserLabel/setUserLabel')->option(['real_name' => '设置和取消用户标签']);
  200. //设置用户标签
  201. Route::post('set_label', 'user.User/set_label')->option(['real_name' => '设置用户标签']);
  202. //保存用户标签
  203. Route::put('save_set_label', 'user.User/save_set_label')->option(['real_name' => '保存用户标签']);
  204. //获取充值套餐
  205. Route::get('recharge/meal', 'user.UserRecharge/index')->option(['real_name' => '获取充值套餐']);
  206. //给用户充值
  207. Route::post('recharge', 'user.UserRecharge/recharge')->option(['real_name' => '获取充值套餐']);
  208. //获取svip列表
  209. Route::get('member/ship', 'user.UserMember/index')->option(['real_name' => '获取svip列表']);
  210. //给用户购买付费会员
  211. Route::post('member', 'user.UserMember/payMember')->option(['real_name' => '给用户购买付费会员']);
  212. })->middleware([AuthTokenMiddleware::class, StoreCkeckRoleMiddleware::class, StoreLogMiddleware::class]);
  213. /**
  214. * 员工
  215. */
  216. Route::group('staff', function () {
  217. //登录收银端
  218. Route::get('login_cashier/:id', 'staff.StoreStaff/loginCashier')->option(['real_name' => '登录收银端']);
  219. //获取店员详情
  220. Route::get('staff_info', 'staff.StoreStaff/info')->option(['real_name' => '获取店员详情']);
  221. //获取店员统计详情
  222. Route::get('info/:id', 'staff.StoreStaff/staffDetail')->option(['real_name' => '获取店员统计详情']);
  223. //获取店员交易统计
  224. Route::get('statistics', 'staff.StoreStaff/statistics')->option(['real_name' => '获取店员交易统计']);
  225. //获取店员交易头部数据
  226. Route::get('statisticsHeader', 'staff.StoreStaff/statisticsHeader')->option(['real_name' => '获取店员交易头部数据']);
  227. //获取门店所有店员
  228. Route::get('staff/all', 'staff.StoreStaff/getStaffSelect')->option(['real_name' => '获取门店所有店员']);
  229. //店员资源路由
  230. Route::resource('staff', 'staff.StoreStaff')->option(['real_name' => [
  231. 'index' => '获取门店店员列表',
  232. 'read' => '获取门店店员详情',
  233. 'create' => '添加门店店员表单',
  234. 'save' => '保存店员',
  235. 'edit' => '获取修改门店店员表单',
  236. 'update' => '修改门店店员',
  237. 'delete' => '删除门店店员'
  238. ]]);
  239. //店员绑定uid
  240. Route::post('binding/user', 'staff.StoreStaff/bandingUser')->option(['real_name' => '店员绑定uid']);
  241. //修改店员状态
  242. Route::put('staff/set_show/:id/:is_show', 'staff.StoreStaff/set_show')->option(['real_name' => '修改店员状态']);
  243. //获取配送员统计详情
  244. Route::get('delivery/info/:id', 'staff.StoreDelivery/deliveryDetail')->option(['real_name' => '获取配送员统计详情']);
  245. //配送员账单统计
  246. Route::get('delivery/statistics', 'staff.StoreDelivery/statistics')->option(['real_name' => '配送员账单统计']);//配送员账单统计
  247. //获取配送员select
  248. Route::get('delivery/get_delivery_select', 'staff.StoreDelivery/getDeliverySelect')->option(['real_name' => '获取配送员select']);
  249. //配送员账单统计头部
  250. Route::get('delivery/statisticsHeader', 'staff.StoreDelivery/statisticsHeader')->option(['real_name' => '配送员账单头部']);
  251. //配送员资源路由
  252. Route::resource('delivery', 'staff.StoreDelivery')->option(['real_name' => [
  253. 'index' => '获取配送员列表',
  254. 'read' => '获取配送员详情',
  255. 'create' => '添加配送员表单',
  256. 'save' => '保存配送员',
  257. 'edit' => '获取修改配送员表单',
  258. 'update' => '修改配送员',
  259. 'delete' => '删除配送员'
  260. ]]);
  261. //修改配送员状态
  262. Route::put('delivery/set_show/:id/:status', 'staff.StoreDelivery/set_status')->option(['real_name' => '修改配送员状态']);
  263. })->middleware([AuthTokenMiddleware::class, StoreCkeckRoleMiddleware::class, StoreLogMiddleware::class]);
  264. /**
  265. * 财务
  266. */
  267. Route::group('finance', function () {
  268. //获取门店财务信息
  269. Route::get('info', 'system.Store/getFinanceInfo')->option(['real_name' => '获取门店财务信息']);
  270. //设置门店财务信息
  271. Route::post('info', 'system.Store/setFinanceInfo')->option(['real_name' => '设置门店财务信息']);
  272. //门店转账列表
  273. Route::get('storeExtract/list', 'finance.StoreExtract/index')->option(['real_name' => '门店转账列表']);
  274. //门店转账记录备注
  275. Route::post('storeExtract/mark/:id', 'finance.StoreExtract/mark')->option(['real_name' => '门店转账记录备注']);
  276. //门店申请转账
  277. Route::post('storeExtract/cash', 'finance.StoreExtract/cash')->option(['real_name' => '门店申请转账']);
  278. //门店流水列表
  279. Route::get('store_finance_flow/list', 'finance.StoreFinanceFlow/index')->option(['real_name' => '门店流水列表']);
  280. //获取店员select
  281. Route::get('store_finance_flow/staff', 'finance.StoreFinanceFlow/getStaffSelect')->option(['real_name' => '获取店员select']);
  282. //门店流水备注
  283. Route::post('store_finance_flow/mark/:id', 'finance.StoreFinanceFlow/mark')->option(['real_name' => '门店流水备注']);
  284. //门店账单记录
  285. Route::get('store_finance_flow/fund_record', 'finance.StoreFinanceFlow/fundRecord')->option(['real_name' => '门店账单记录']);
  286. //门店账单详情
  287. Route::get('store_finance_flow/fund_record_info', 'finance.StoreFinanceFlow/fundRecordInfo')->option(['real_name' => '门店账单详情']);
  288. })->middleware([AuthTokenMiddleware::class, StoreCkeckRoleMiddleware::class, StoreLogMiddleware::class]);
  289. /**
  290. * 系统设置维护 系统权限管理、系统菜单管理 系统配置 相关路由
  291. */
  292. Route::group('setting', function () {
  293. //运费模板列表
  294. Route::get('shipping_templates/list', 'product.shipping.ShippingTemplates/temp_list')->option(['real_name' => '运费模板列表']);
  295. //修改运费模板数据
  296. Route::get('shipping_templates/:id/edit', 'product.shipping.ShippingTemplates/edit')->option(['real_name' => '修改运费模板数据']);
  297. //新增或修改运费模版
  298. Route::post('shipping_templates/save/:id', 'product.shipping.ShippingTemplates/save')->option(['real_name' => '新增或修改运费模版']);
  299. //删除运费模板
  300. Route::delete('shipping_templates/del/:id', 'product.shipping.ShippingTemplates/delete')->option(['real_name' => '删除运费模板']);
  301. //城市数据接口
  302. Route::get('shipping_templates/city_list', 'product.shipping.ShippingTemplates/city_list')->option(['real_name' => '城市数据接口']);
  303. })->middleware([AuthTokenMiddleware::class, StoreCkeckRoleMiddleware::class, StoreLogMiddleware::class]);
  304. /**
  305. * 商品
  306. */
  307. Route::group('product', function () {
  308. //商品批量操作
  309. Route::post('batch_process', 'product.StoreProduct/batchProcess')->option(['real_name' => '商品批量操作']);
  310. //商品分类列表
  311. Route::get('category', 'product.StoreProductCategory/index')->option(['real_name' => '商品分类列表']);
  312. //商品标签(分类)树形列表
  313. Route::get('product_label', 'product.label.StoreProductLabel/tree_list')->option(['real_name' => '商品标签(分类)树形列表']);
  314. Route::get('all_label', 'product.label.StoreProductLabel/allLabel')->option(['real_name' => '所有的用户标签']);
  315. Route::get('all_ensure', 'product.ensure.StoreProductEnsure/allEnsure')->option(['real_name' => '所有的保障服务']);
  316. Route::get('all_specs', 'product.specs.StoreProductSpecs/allSpecs')->option(['real_name' => '所有的参数模版']);
  317. Route::get('get_all_unit', 'product.StoreProductUnit/getAllUnit')->option(['real_name' => '获取所有商品单位']);
  318. //商品分类树形列表
  319. Route::get('category/tree/:type', 'product.StoreProductCategory/tree_list')->option(['real_name' => '商品分类树形列表']);
  320. //商品分类cascader行列表
  321. Route::get('category/cascader_list/[:type]', 'product.StoreProductCategory/cascader_list')->option(['real_name' => '商品分类cascader行列表']);
  322. //获取运费模板
  323. Route::get('product/get_template', 'product.StoreProduct/get_template')->option(['real_name' => '获取运费模板']);
  324. //上传视频密钥接口
  325. Route::get('product/get_temp_keys', 'product.StoreProduct/getTempKeys')->option(['real_name' => '上传视频密钥接口']);
  326. //获取商品规则属性模板
  327. Route::get('product/get_rule', 'product.StoreProduct/get_rule')->option(['real_name' => '获取商品规则属性模板']);
  328. //获取所有商品列表
  329. Route::get('product/list', 'product.StoreProduct/search_list')->option(['real_name' => '获取所有商品列表']);
  330. //获取商品规格
  331. Route::get('product/attrs/:id', 'product.StoreProduct/getAttrs')->option(['real_name' => '获取商品规格']);
  332. //快速批量修改库存
  333. Route::put('product/saveStocks/:id', 'product.StoreProduct/saveProductAttrsStock')->option(['real_name' => '快速批量修改库存']);
  334. //门店同步商品库存
  335. Route::post('product/synchStocks', 'product.StoreProduct/synchStocks')->option(['real_name' => '门店同步商品库存']);
  336. //商品列表
  337. Route::get('product', 'product.StoreProduct/index')->option(['real_name' => '商品列表']);
  338. //新建或修改商品
  339. Route::post('product/:id', 'product.StoreProduct/save')->option(['real_name' => '新建或修改商品']);
  340. //商品放入回收站
  341. Route::delete('product/:id', 'product.StoreProduct/delete')->option(['real_name' => '商品放入回收站']);
  342. //修改商品状态
  343. Route::put('product/set_show/:id/:is_show', 'product.StoreProduct/set_show')->option(['real_name' => '修改商品状态']);
  344. //设置批量商品上架
  345. Route::put('product/product_show', 'product.StoreProduct/product_show')->option(['real_name' => '设置批量商品上架']);
  346. //设置批量商品下架
  347. Route::put('product/product_unshow', 'product.StoreProduct/product_unshow')->option(['real_name' => '设置批量商品下架']);
  348. //获取关联用户标签
  349. Route::get('getUserLabel', 'product.StoreProduct/getUserLabel')->option(['real_name' => '获取关联用户标签']);
  350. //商品规则列表
  351. Route::get('product/rule', 'product.StoreProductRule/index')->option(['real_name' => '商品规则列表']);
  352. //新建或编辑商品规则
  353. Route::post('product/rule/:id', 'product.StoreProductRule/save')->option(['real_name' => '新建或编辑商品规则']);
  354. //商品规则详情
  355. Route::get('product/rule/:id', 'product.StoreProductRule/read')->option(['real_name' => '商品规则详情']);
  356. //删除商品规则
  357. Route::delete('product/rule/delete/:id', 'product.StoreProductRule/delete')->option(['real_name' => '删除商品规则']);
  358. //商品详情
  359. Route::get('product/:id', 'product.StoreProduct/get_product_info')->option(['real_name' => '商品详情']);
  360. //商品列表头部数据
  361. Route::get('type_header', 'product.StoreProduct/type_header')->option(['real_name' => '商品列表头部数据']);
  362. //修改商品状态
  363. Route::put('product/set_show/:id/:is_show', 'product.StoreProduct/set_show')->option(['real_name' => '修改商品状态']);
  364. //生成商品规格列表
  365. Route::post('generate_attr/:id/:type', 'product.StoreProduct/is_format_attr')->option(['real_name' => '生成商品规格列表']);
  366. //商品评价
  367. //商品评论列表
  368. Route::get('reply', 'product.StoreProductReply/index')->option(['real_name' => '商品评论列表']);
  369. //商品回复评论
  370. Route::put('reply/set_reply/:id', 'product.StoreProductReply/set_reply')->option(['real_name' => '商品回复评论']);
  371. //删除商品评论
  372. Route::delete('reply/:id', 'product.StoreProductReply/delete')->option(['real_name' => '删除商品评论']);
  373. //商品品牌cascader行列表
  374. Route::get('brand/cascader_list/[:type]', 'product.StoreBrand/cascader_list')->option(['real_name' => '商品品牌cascader行列表']);
  375. //商品标签
  376. Route::post('label/:id', 'product.label.StoreProductLabel/save')->option(['real_name' => '保存商品标签']);
  377. Route::delete('label/:id', 'product.label.StoreProductLabel/delete')->option(['real_name' => '删除商品标签']);
  378. Route::get('label/form', 'product.label.StoreProductLabel/getLabelForm')->option(['real_name' => '获取商品标签表单']);
  379. })->middleware([AuthTokenMiddleware::class, StoreCkeckRoleMiddleware::class, StoreLogMiddleware::class]);
  380. /**
  381. * 短视频相关路由
  382. */
  383. Route::group('marketing', function () {
  384. //短视频
  385. Route::get('video/index', 'marketing.video.video/index')->option(['real_name' => '短视频列表']);
  386. //短视频信息
  387. Route::get('video/info/:id', 'marketing.video.video/info')->option(['real_name' => '短视频信息']);
  388. //短视频保存
  389. Route::post('video/save/:id', 'marketing.video.video/save')->option(['real_name' => '短视频保存']);
  390. //短视频上下架
  391. Route::get('video/set_status/:id/:status', 'marketing.video.video/set_show')->option(['real_name' => '短视频上下架']);
  392. //短视频删除
  393. Route::delete('video/del/:id', 'marketing.video.video/delete')->option(['real_name' => '短视频删除']);
  394. //短视频评论
  395. Route::get('video/comment', 'marketing.video.VideoComment/index')->option(['real_name' => '短视频评论列表']);
  396. //短视频评论回复列表
  397. Route::get('video/comment/reply/:id', 'marketing.video.VideoComment/getCommentReply')->option(['real_name' => '短视频评论回复列表']);
  398. //短视频评论回复
  399. Route::post('video/comment/reply/:id', 'marketing.video.VideoComment/setReply')->option(['real_name' => '短视频评论回复']);
  400. //短视频评论获取管理员回复
  401. Route::get('video/comment/get_reply/:id', 'marketing.video.VideoComment/getReply')->option(['real_name' => '短视频评论获取管理员回复']);
  402. //短视频评论删除
  403. Route::delete('video/comment/:id', 'marketing.video.VideoComment/delete')->option(['real_name' => '短视频评论列表']);
  404. //短视频自评表单
  405. Route::get('video/comment/fictitious/:video_id', 'marketing.video.VideoComment/fictitiousComment')->option(['real_name' => '短视频自评表单']);
  406. //短视频保存自评
  407. Route::post('video/comment/save_fictitious', 'marketing.video.VideoComment/saveFictitiousComment')->option(['real_name' => '短视频保存自评']);
  408. })->middleware([AuthTokenMiddleware::class, StoreCkeckRoleMiddleware::class, StoreLogMiddleware::class]);
  409. /**
  410. * 附件相关路由
  411. */
  412. Route::group('file', function () {
  413. //图片附件列表
  414. Route::get('file', 'file.SystemAttachment/index')->option(['real_name' => '图片附件列表']);
  415. //删除图片
  416. Route::post('file/delete', 'file.SystemAttachment/delete')->option(['real_name' => '删除图片']);
  417. //移动图片分类表单
  418. Route::get('file/move', 'file.SystemAttachment/move')->option(['real_name' => '移动图片分类表单']);
  419. //移动图片分类
  420. Route::put('file/do_move', 'file.SystemAttachment/moveImageCate')->option(['real_name' => '移动图片分类']);
  421. //修改图片名称
  422. Route::put('file/update/:id', 'file.SystemAttachment/update')->option(['real_name' => '修改图片名称']);
  423. //上传图片
  424. Route::post('upload/[:upload_type]', 'file.SystemAttachment/upload')->option(['real_name' => '上传图片']);
  425. //获取上传类型
  426. Route::get('upload_type', 'file.SystemAttachment/uploadType')->option(['real_name' => '上传类型']);
  427. //分片上传本地视频
  428. Route::post('video_upload', 'file.SystemAttachment/videoUpload')->option(['real_name' => '分片上传本地视频']);
  429. //oss视频素材保存
  430. Route::post('video_attachment', 'file.SystemAttachment/saveVideoAttachment')->option(['real_name' => '视频素材保存']);
  431. //获取扫码上传页面链接以及参数
  432. Route::get('scan/qrcode', 'file.SystemAttachment/scanUploadQrcode')->option(['real_name' => '获取扫码上传页面链接以及参数']);
  433. //删除二维码
  434. Route::get('remove/qrcode', 'file.SystemAttachment/removeUploadQrcode')->option(['real_name' => '删除二维码']);
  435. //获取扫码上传的图片数据
  436. Route::get('scan/image/list/:scan_token', 'file.SystemAttachment/scanUploadImage')->option(['real_name' => '获取扫码上传的图片数据']);
  437. //网络图片上传
  438. Route::post('online/upload', 'file.SystemAttachment/onlineUpload')->option(['real_name' => '网络图片上传']);
  439. //获取上传信息
  440. Route::get('get/way_data', 'file.SystemAttachment/getAdminsData')->option(['real_name' => '获取上传信息']);
  441. //保存上传信息
  442. Route::get('set/way_data/:is_way', 'file.SystemAttachment/setAdminsData')->option(['real_name' => '保存上传信息']);
  443. //附件分类管理资源路由
  444. Route::resource('category', 'file.SystemAttachmentCategory')->option(['real_name' => [
  445. 'index' => '获取附件分类列表',
  446. 'read' => '获取附件分类详情',
  447. 'create' => '获取创建附件分类表单',
  448. 'save' => '保存附件分类',
  449. 'edit' => '获取修改附件分类表单',
  450. 'update' => '修改附件分类',
  451. 'delete' => '删除附件分类'
  452. ]]);
  453. })->middleware([AuthTokenMiddleware::class, StoreCkeckRoleMiddleware::class, StoreLogMiddleware::class]);
  454. Route::group('order', function () {
  455. Route::group('cashier', function () {
  456. Route::post('user', 'order.Cashier/getUserInfo')->name('cashierUserInfo')->option(['real_name' => '获取收银台用户信息']);
  457. Route::get('cate', 'order.Cashier/getCateGoryList')->name('cashierCateGoryList')->option(['real_name' => '获取收银台一级分类列表']);
  458. Route::get('product', 'order.Cashier/getProductList')->name('cashierProductList')->option(['real_name' => '获取收银台商品信息']);
  459. Route::get('cart/:uid/:staff_id', 'order.Cashier/getCartList')->name('cashierCartList')->option(['real_name' => '获取收银台购物车信息']);
  460. Route::post('cart/:uid', 'order.Cashier/addCart')->name('cashierAddCart')->option(['real_name' => '收银台添加购物车']);
  461. Route::post('hang', 'order.Cashier/saveHangOrder')->name('saveHangOrder')->option(['real_name' => '收银台保存挂单']);
  462. Route::delete('hang', 'order.Cashier/deleteHangOrder')->name('deleteHangOrder')->option(['real_name' => '收银台删除挂单']);
  463. Route::post('switch/:staffId', 'order.Cashier/switchCartUser')->name('switchCartUser')->option(['real_name' => '收银台切换购物车用户']);
  464. Route::get('hang/:staffId', 'order.Cashier/getHangOrder')->name('getHangOrder')->option(['real_name' => '收银台获取挂单']);
  465. Route::get('hang/list/:staffId', 'order.Cashier/getHangOrderList')->name('getHangOrderList')->option(['real_name' => '收银台获取挂单列表分页']);
  466. Route::delete('cart/:uid', 'order.Cashier/delCart')->name('cashierDelCart')->option(['real_name' => '收银台删除购物车信息']);
  467. Route::put('cart/:uid', 'order.Cashier/numCart')->name('cashierNumCart')->option(['real_name' => '收银台更改购物车数量']);
  468. Route::put('changeCart', 'order.Cashier/changeCart')->name('cashierChangeCart')->option(['real_name' => '收银台更改购物车规格']);
  469. Route::post('compute/:uid', 'order.Cashier/computeOrder')->name('cashierComputeOrder')->option(['real_name' => '收银台计算订单金额']);
  470. Route::post('create/:uid', 'order.Cashier/createOrder')->name('cashierCreateOrder')->option(['real_name' => '收银台创建订单']);
  471. Route::get('staff', 'order.Cashier/getStaffList')->name('getStaffList')->option(['real_name' => '获取当前门店店员列表和店员信息']);
  472. Route::post('code', 'order.Cashier/getAnalysisCode')->name('getAnalysisCode')->option(['real_name' => '扫码自动解析']);
  473. Route::get('detail/:id/[:uid]', 'order.Cashier/getProductDetail')->name('getProductDetail')->option(['real_name' => '收银台获取商品详情']);
  474. Route::post('pay/:orderId', 'order.Cashier/payOrder')->name('payOrder')->option(['real_name' => '收银台订单支付']);
  475. Route::get('cashier_scan', 'order.Cashier/cashier_scan')->name('cashierScan')->option(['real_name' => '门店收银台二维码']);
  476. Route::post('coupon_list/:uid', 'order.Cashier/couponList')->name('cashierScan')->option(['real_name' => '用户优惠券列表']);
  477. });
  478. //充值订单列表
  479. Route::get('recharge', 'order.Recharge/index')->name('RechargeOrderList')->option(['real_name' => '充值订单列表']);
  480. //删除充值记录
  481. Route::delete('recharge/:id', 'order.Recharge/delete')->option(['real_name' => '删除充值记录']);
  482. //获取用户充值数据
  483. Route::get('recharge/user_recharge', 'order.Recharge/user_recharge')->option(['real_name' => '获取用户充值数据']);
  484. //充值退款表单
  485. Route::get('recharge/:id/refund_edit', 'order.Recharge/refund_edit')->option(['real_name' => '充值退款表单']);
  486. //充值退款
  487. Route::put('recharge/:id', 'order.Recharge/refund_update')->option(['real_name' => '充值退款']);
  488. //保存充值订单备注
  489. Route::put('recharge/remark/:id', 'order.Recharge/remarks')->option(['real_name' => '保存充值订单备注']);
  490. //获取充值订单备注
  491. Route::get('recharge/remark/:id', 'order.Recharge/getRemark')->option(['real_name' => '获取充值订单备注']);
  492. //充值退款表单
  493. Route::get('recharge/:id/refund_edit', 'order.Recharge/refund_edit')->option(['real_name' => '充值退款表单']);
  494. //充值退款
  495. Route::put('recharge/:id', 'order.Recharge/refund_update')->option(['real_name' => '充值退款']);
  496. //付费会员订单列表
  497. Route::get('vip_order', 'order.PayVipOrder/index')->name('PayVipOrderList')->option(['real_name' => '付费会员订单列表']);
  498. //获取会员备注
  499. Route::get('vip/remark/:id', 'order.PayVipOrder/getRemark')->name('getRemark')->option(['real_name' => '获取会员备注']);
  500. //获取会员状态
  501. Route::get('vip/status/:id', 'order.PayVipOrder/status')->name('getStatusList')->option(['real_name' => '获取会员状态']);
  502. //保存会员备注
  503. Route::put('vip/remark/:id', 'order.PayVipOrder/remark')->name('remarkSave')->option(['real_name' => '保存会员备注']);
  504. //打印订单
  505. Route::get('print/:id', 'order.Order/order_print')->name('StoreOrderPrint')->option(['real_name' => '打印订单']);
  506. //获取头部数据
  507. Route::get('header', 'order.Order/header')->name('StoreOrderHeader')->option(['real_name' => '获取门店订单头部统计']);
  508. //订单列表
  509. Route::get('list', 'order.Order/index')->name('StoreOrderList')->option(['real_name' => '订单列表']);
  510. //订单头部数据
  511. Route::get('chart', 'order.Order/chart')->name('StoreOrderChart')->option(['real_name' => '订单头部数据']);
  512. //订单核销表单弹窗
  513. Route::get('write/form/:id', 'order.Order/writeOrderFrom')->name('writeOrderForm')->option(['real_name' => '订单核销表单']);
  514. //订单核销表单提交
  515. Route::post('write/form/:id', 'order.Order/writeoffFrom')->name('writeOrderForm')->option(['real_name' => '订单核销表单']);
  516. //订单核销
  517. Route::post('write', 'order.Order/write_order')->name('writeOrder')->option(['real_name' => '订单核销']);
  518. //获取核销订单商品信息
  519. Route::get('writeOff/cartInfo', 'order.Order/orderCartInfo')->name('writeOrderCartInfo')->option(['real_name' => '获取核销订单商品信息']);
  520. //订单号核销
  521. Route::put('write_update/:order_id', 'order.Order/wirteoff')->name('writeOrderUpdate')->option(['real_name' => '订单号核销']);
  522. //获取订单编辑表单
  523. Route::get('edit/:id', 'order.Order/edit')->name('StoreOrderEdit')->option(['real_name' => '获取订单编辑表单']);
  524. //修改订单
  525. Route::put('update/:id', 'order.Order/update')->name('StoreOrderUpdate')->option(['real_name' => '修改订单']);
  526. //确认收货
  527. Route::put('take/:id', 'order.Order/take_delivery')->name('StoreOrderTakeDelivery')->option(['real_name' => '确认收货']);
  528. //订单发送货
  529. Route::put('delivery/:id', 'order.Order/update_delivery')->name('StoreOrderUpdateDelivery')->option(['real_name' => '订单发送货']);
  530. //获取订单可拆分商品列表
  531. Route::get('split_cart_info/:id', 'order.Order/split_cart_info')->name('StoreOrderSplitCartInfo')->option(['real_name' => '获取订单可拆分商品列表']);
  532. //拆单发送货
  533. Route::put('split_delivery/:id', 'order.Order/split_delivery')->name('StoreOrderSplitDelivery')->option(['real_name' => '拆单发送货']);
  534. //获取订单拆分子订单列表
  535. Route::get('split_order/:id', 'order.Order/split_order')->name('StoreOrderSplitOrder')->option(['real_name' => '获取订单拆分子订单列表']);
  536. //订单退款表单
  537. Route::get('refund/:id', 'order.Order/refund')->name('StoreOrderRefund')->option(['real_name' => '订单退款表单']);
  538. //订单退款
  539. Route::put('refund/:id', 'order.Order/update_refund')->name('StoreOrderUpdateRefund')->option(['real_name' => '订单退款']);
  540. //后台拆单退款
  541. Route::put('open/refund/:id', 'order.Order/open_order_refund')->name('StoreOrderUpdateRefund')->option(['real_name' => '后台拆单退款']);
  542. //快递公司电子面单模版
  543. Route::get('express/temp', 'order.Order/express_temp')->option(['real_name' => '快递公司电子面单模版']);
  544. //获取物流信息
  545. Route::get('express/:id', 'order.Order/get_express')->name('StoreOrderUpdateExpress')->option(['real_name' => '获取物流信息']);
  546. //获取物流公司
  547. Route::get('express_list', 'order.Order/express')->name('StoreOrdeRexpressList')->option(['real_name' => '获取物流公司']);
  548. //订单详情
  549. Route::get('info/:id', 'order.Order/order_info')->name('StoreOrderorInfo')->option(['real_name' => '订单详情']);
  550. //获取配送信息表单
  551. Route::get('distribution/:id', 'order.Order/distribution')->name('StoreOrderorDistribution')->option(['real_name' => '获取配送信息表单']);
  552. //修改配送信息
  553. Route::put('distribution/:id', 'order.Order/update_distribution')->name('StoreOrderorUpdateDistribution')->option(['real_name' => '修改配送信息']);
  554. //获取不退款表单
  555. Route::get('no_refund/:id', 'order.Order/no_refund')->name('StoreOrderorNoRefund')->option(['real_name' => '获取不退款表单']);
  556. //修改不退款理由
  557. Route::put('no_refund/:id', 'order.Order/update_un_refund')->name('StoreOrderorUpdateNoRefund')->option(['real_name' => '修改不退款理由']);
  558. //线下支付
  559. Route::post('pay_offline/:id', 'order.Order/pay_offline')->name('StoreOrderorPayOffline')->option(['real_name' => '线下支付']);
  560. //获取退积分表单
  561. Route::get('refund_integral/:id', 'order.Order/refund_integral')->name('StoreOrderorRefundIntegral')->option(['real_name' => '获取退积分表单']);
  562. //修改退积分
  563. Route::put('refund_integral/:id', 'order.Order/update_refund_integral')->name('StoreOrderorUpdateRefundIntegral')->option(['real_name' => '修改退积分']);
  564. //修改备注信息
  565. Route::put('remark/:id', 'order.Order/remark')->name('StoreOrderorRemark')->option(['real_name' => '修改备注信息']);
  566. //获取订单状态
  567. Route::get('status/:id', 'order.Order/status')->name('StoreOrderorStatus')->option(['real_name' => '获取订单状态']);
  568. //删除订单单个
  569. Route::delete('del/:id', 'order.Order/del')->name('StoreOrderorDel')->option(['real_name' => '删除订单单个']);
  570. //批量删除订单
  571. Route::post('dels', 'order.Order/del_orders')->name('StoreOrderorDels')->option(['real_name' => '批量删除订单']);
  572. //面单默认配置信息
  573. Route::get('sheet_info', 'order.Order/getDeliveryInfo')->option(['real_name' => '面单默认配置信息']);
  574. //电子面单模板列表
  575. Route::get('expr/temp', 'order.Order/expr_temp')->option(['real_name' => '电子面单模板列表']);
  576. //更多操作打印电子面单
  577. Route::get('order_dump/:order_id', 'order.Order/order_dump')->option(['real_name' => '更多操作打印电子面单']);
  578. //批量发货
  579. Route::get('hand/batch_delivery', 'order.Order/hand_batch_delivery')->option(['real_name' => '批量发货']);
  580. //自动批量发货
  581. Route::post('other/batch_delivery', 'order.Order/other_batch_delivery')->option(['real_name' => '自动批量发货']);
  582. //订单批量删除
  583. Route::post('batch/del_orders', 'order.Order/del_orders')->option(['real_name' => '订单批量删除']);
  584. //订单导出
  585. Route::post('export/:type', 'order.Order/export')->option(['real_name' => '订单导出']);
  586. //订单列表获取配送员
  587. Route::get('delivery/list', 'order.Order/getDeliveryList')->option(['real_name' => '订单列表获取配送员']);
  588. //配送订单
  589. Route::get('delivery_order/list', 'order.StoreDeliveryOrder/index')->name('StoreDeliveryOrderList')->option(['real_name' => '配送订单列表']);
  590. Route::get('delivery_order/info/:id', 'order.StoreDeliveryOrder/detail')->name('StoreDeliveryOrderDetail')->option(['real_name' => '配送订单详情']);
  591. Route::get('delivery_order/cancelForm/:id', 'order.StoreDeliveryOrder/cancelForm')->name('StoreDeliveryOrderCancelForm')->option(['real_name' => '配送订单取消表单']);
  592. Route::post('delivery_order/cancel/:id', 'order.StoreDeliveryOrder/cancel')->name('StoreDeliveryOrderCancel')->option(['real_name' => '配送订单取消']);
  593. Route::delete('delivery_order/:id', 'order.StoreDeliveryOrder/delete')->name('StoreDeliveryOrderDelete')->option(['real_name' => '配送订单删除']);
  594. //打印配货单信息
  595. Route::get('distribution_info', 'order.Order/distributionInfo')->name('StoreOrderDistributionInfo')->option(['real_name' => '打印配货单信息']);
  596. })->middleware([AuthTokenMiddleware::class, StoreCkeckRoleMiddleware::class, StoreLogMiddleware::class]);
  597. /**
  598. * 售后 相关路由
  599. */
  600. Route::group('refund', function () {
  601. //售后列表
  602. Route::get('list', 'order.Refund/getRefundList')->option(['real_name' => '售后订单列表']);
  603. //商家同意退款,等待用户退货
  604. Route::get('agree/:order_id', 'order.Refund/agreeRefund')->option(['real_name' => '商家同意退款,等待用户退货']);
  605. //售后订单备注
  606. Route::put('remark/:id', 'order.Refund/remark')->option(['real_name' => '售后订单备注']);
  607. //售后订单退款表单
  608. Route::get('refund/:id', 'order.Refund/refund')->name('StoreOrderRefund')->option(['real_name' => '售后订单退款表单']);
  609. //售后订单退款
  610. Route::put('refund/:id', 'order.Refund/update_refund')->name('StoreOrderUpdateRefund')->option(['real_name' => '售后订单退款']);
  611. //售后订单详情
  612. Route::get('detail/:id', 'order.Refund/detail')->name('StoreOrderRefundDetail')->option(['real_name' => '售后订单详情']);
  613. })->middleware([AuthTokenMiddleware::class, StoreCkeckRoleMiddleware::class, StoreLogMiddleware::class,]);
  614. /**
  615. * 导出excel相关路由
  616. */
  617. Route::group('export', function () {
  618. //门店账单导出
  619. Route::get('financeRecord', 'export.ExportExcel/financeRecord')->option(['real_name' => '门店账单导出']);
  620. })->middleware([AuthTokenMiddleware::class, StoreCkeckRoleMiddleware::class, StoreLogMiddleware::class]);
  621. /**
  622. * miss 路由
  623. */
  624. Route::miss(function () {
  625. if (app()->request->isOptions()) {
  626. $header = Config::get('cookie.header');
  627. $header['Access-Control-Allow-Origin'] = app()->request->header('origin');
  628. return Response::create('ok')->code(200)->header($header);
  629. } else
  630. return Response::create()->code(404);
  631. });
  632. })->prefix('store.')->middleware(InstallMiddleware::class)->middleware(AllowOriginMiddleware::class)->middleware(StationOpenMiddleware::class);