crm_menu.sql 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. -- ----------------------------
  2. -- 合同菜单
  3. -- ----------------------------
  4. -- 菜单 SQL
  5. INSERT INTO system_menu(
  6. name, permission, type, sort, parent_id,
  7. path, icon, component, status, component_name
  8. )
  9. VALUES (
  10. '合同管理', '', 2, 0, 2375,
  11. 'contract', '', 'crm/contract/index', 0, 'Contract'
  12. );
  13. -- 按钮父菜单ID
  14. -- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
  15. SELECT @parentId := LAST_INSERT_ID();
  16. -- 按钮 SQL
  17. INSERT INTO system_menu(
  18. name, permission, type, sort, parent_id,
  19. path, icon, component, status
  20. )
  21. VALUES (
  22. '合同查询', 'crm:contract:query', 3, 1, @parentId,
  23. '', '', '', 0
  24. );
  25. INSERT INTO system_menu(
  26. name, permission, type, sort, parent_id,
  27. path, icon, component, status
  28. )
  29. VALUES (
  30. '合同创建', 'crm:contract:create', 3, 2, @parentId,
  31. '', '', '', 0
  32. );
  33. INSERT INTO system_menu(
  34. name, permission, type, sort, parent_id,
  35. path, icon, component, status
  36. )
  37. VALUES (
  38. '合同更新', 'crm:contract:update', 3, 3, @parentId,
  39. '', '', '', 0
  40. );
  41. INSERT INTO system_menu(
  42. name, permission, type, sort, parent_id,
  43. path, icon, component, status
  44. )
  45. VALUES (
  46. '合同删除', 'crm:contract:delete', 3, 4, @parentId,
  47. '', '', '', 0
  48. );
  49. INSERT INTO system_menu(
  50. name, permission, type, sort, parent_id,
  51. path, icon, component, status
  52. )
  53. VALUES (
  54. '合同导出', 'crm:contract:export', 3, 5, @parentId,
  55. '', '', '', 0
  56. );
  57. -- ----------------------------
  58. -- 线索菜单
  59. -- ----------------------------
  60. -- 菜单 SQL
  61. INSERT INTO system_menu(
  62. name, permission, type, sort, parent_id,
  63. path, icon, component, status, component_name
  64. )
  65. VALUES (
  66. '线索管理', '', 2, 0, 2375,
  67. 'clue', '', 'crm/clue/index', 0, 'CrmClue'
  68. );
  69. -- 按钮父菜单ID
  70. -- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
  71. SELECT @parentId := LAST_INSERT_ID();
  72. -- 按钮 SQL
  73. INSERT INTO system_menu(
  74. name, permission, type, sort, parent_id,
  75. path, icon, component, status
  76. )
  77. VALUES (
  78. '线索查询', 'crm:clue:query', 3, 1, @parentId,
  79. '', '', '', 0
  80. );
  81. INSERT INTO system_menu(
  82. name, permission, type, sort, parent_id,
  83. path, icon, component, status
  84. )
  85. VALUES (
  86. '线索创建', 'crm:clue:create', 3, 2, @parentId,
  87. '', '', '', 0
  88. );
  89. INSERT INTO system_menu(
  90. name, permission, type, sort, parent_id,
  91. path, icon, component, status
  92. )
  93. VALUES (
  94. '线索更新', 'crm:clue:update', 3, 3, @parentId,
  95. '', '', '', 0
  96. );
  97. INSERT INTO system_menu(
  98. name, permission, type, sort, parent_id,
  99. path, icon, component, status
  100. )
  101. VALUES (
  102. '线索删除', 'crm:clue:delete', 3, 4, @parentId,
  103. '', '', '', 0
  104. );
  105. INSERT INTO system_menu(
  106. name, permission, type, sort, parent_id,
  107. path, icon, component, status
  108. )
  109. VALUES (
  110. '线索导出', 'crm:clue:export', 3, 5, @parentId,
  111. '', '', '', 0
  112. );
  113. -- 菜单 SQL
  114. INSERT INTO system_menu(
  115. name, permission, type, sort, parent_id,
  116. path, icon, component, status, component_name
  117. )
  118. VALUES (
  119. '联系人', '', 2, 0, ${table.parentMenuId},
  120. 'contact', '', 'crm/contact/index', 0, 'Contact'
  121. );
  122. -- 按钮父菜单ID
  123. -- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
  124. SELECT @parentId := LAST_INSERT_ID();
  125. -- 按钮 SQL
  126. INSERT INTO system_menu(
  127. name, permission, type, sort, parent_id,
  128. path, icon, component, status
  129. )
  130. VALUES (
  131. '联系人查询', 'crm:contact:query', 3, 1, @parentId,
  132. '', '', '', 0
  133. );
  134. INSERT INTO system_menu(
  135. name, permission, type, sort, parent_id,
  136. path, icon, component, status
  137. )
  138. VALUES (
  139. '联系人创建', 'crm:contact:create', 3, 2, @parentId,
  140. '', '', '', 0
  141. );
  142. INSERT INTO system_menu(
  143. name, permission, type, sort, parent_id,
  144. path, icon, component, status
  145. )
  146. VALUES (
  147. '联系人更新', 'crm:contact:update', 3, 3, @parentId,
  148. '', '', '', 0
  149. );
  150. INSERT INTO system_menu(
  151. name, permission, type, sort, parent_id,
  152. path, icon, component, status
  153. )
  154. VALUES (
  155. '联系人删除', 'crm:contact:delete', 3, 4, @parentId,
  156. '', '', '', 0
  157. );
  158. INSERT INTO system_menu(
  159. name, permission, type, sort, parent_id,
  160. path, icon, component, status
  161. )
  162. VALUES (
  163. '联系人导出', 'crm:contact:export', 3, 5, @parentId,
  164. '', '', '', 0
  165. );
  166. -- ----------------------------
  167. -- 合同菜单
  168. -- ----------------------------
  169. -- 菜单 SQL
  170. INSERT INTO system_menu(
  171. name, permission, type, sort, parent_id,
  172. path, icon, component, status, component_name
  173. )
  174. VALUES (
  175. '商机管理', '', 2, 0, '',
  176. 'business', '', 'crm/business/index', 0, 'CrmBusiness'
  177. );
  178. -- 按钮父菜单ID
  179. -- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
  180. SELECT @parentId := LAST_INSERT_ID();
  181. -- 按钮 SQL
  182. INSERT INTO system_menu(
  183. name, permission, type, sort, parent_id,
  184. path, icon, component, status
  185. )
  186. VALUES (
  187. '商机查询', 'crm:business:query', 3, 1, @parentId,
  188. '', '', '', 0
  189. );
  190. INSERT INTO system_menu(
  191. name, permission, type, sort, parent_id,
  192. path, icon, component, status
  193. )
  194. VALUES (
  195. '商机创建', 'crm:business:create', 3, 2, @parentId,
  196. '', '', '', 0
  197. );
  198. INSERT INTO system_menu(
  199. name, permission, type, sort, parent_id,
  200. path, icon, component, status
  201. )
  202. VALUES (
  203. '商机更新', 'crm:business:update', 3, 3, @parentId,
  204. '', '', '', 0
  205. );
  206. INSERT INTO system_menu(
  207. name, permission, type, sort, parent_id,
  208. path, icon, component, status
  209. )
  210. VALUES (
  211. '商机删除', 'crm:business:delete', 3, 4, @parentId,
  212. '', '', '', 0
  213. );
  214. INSERT INTO system_menu(
  215. name, permission, type, sort, parent_id,
  216. path, icon, component, status
  217. )
  218. VALUES (
  219. '商机导出', 'crm:business:export', 3, 5, @parentId,
  220. '', '', '', 0
  221. );
  222. -- ----------------------------
  223. -- 客户管理菜单
  224. -- ----------------------------
  225. INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2375, '客户管理', '', 1, 0, 0, '/crm', 'ep:avatar', '', '', 0, b'1', b'1', b'1', '1', '2023-10-20 00:36:13', '1', '2023-10-19 16:37:24', b'0');
  226. -- ----------------------------
  227. -- 回款菜单
  228. -- ----------------------------
  229. -- 菜单 SQL
  230. INSERT INTO system_menu(
  231. name, permission, type, sort, parent_id,
  232. path, icon, component, status, component_name
  233. )
  234. VALUES (
  235. '回款管理', '', 2, 0, 2375,
  236. 'receivable', '', 'crm/receivable/index', 0, 'Receivable'
  237. );
  238. -- 按钮父菜单ID
  239. -- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
  240. SELECT @parentId := LAST_INSERT_ID();
  241. -- 按钮 SQL
  242. INSERT INTO system_menu(
  243. name, permission, type, sort, parent_id,
  244. path, icon, component, status
  245. )
  246. VALUES (
  247. '回款管理查询', 'crm:receivable:query', 3, 1, @parentId,
  248. '', '', '', 0
  249. );
  250. INSERT INTO system_menu(
  251. name, permission, type, sort, parent_id,
  252. path, icon, component, status
  253. )
  254. VALUES (
  255. '回款管理创建', 'crm:receivable:create', 3, 2, @parentId,
  256. '', '', '', 0
  257. );
  258. INSERT INTO system_menu(
  259. name, permission, type, sort, parent_id,
  260. path, icon, component, status
  261. )
  262. VALUES (
  263. '回款管理更新', 'crm:receivable:update', 3, 3, @parentId,
  264. '', '', '', 0
  265. );
  266. INSERT INTO system_menu(
  267. name, permission, type, sort, parent_id,
  268. path, icon, component, status
  269. )
  270. VALUES (
  271. '回款管理删除', 'crm:receivable:delete', 3, 4, @parentId,
  272. '', '', '', 0
  273. );
  274. INSERT INTO system_menu(
  275. name, permission, type, sort, parent_id,
  276. path, icon, component, status
  277. )
  278. VALUES (
  279. '回款管理导出', 'crm:receivable:export', 3, 5, @parentId,
  280. '', '', '', 0
  281. );
  282. -- ----------------------------
  283. -- 回款计划菜单
  284. -- ----------------------------
  285. -- 菜单 SQL
  286. INSERT INTO system_menu(
  287. name, permission, type, sort, parent_id,
  288. path, icon, component, status, component_name
  289. )
  290. VALUES (
  291. '回款计划管理', '', 2, 0, 2375,
  292. 'receivable-plan', '', 'crm/receivablePlan/index', 0, 'ReceivablePlan'
  293. );
  294. -- 按钮父菜单ID
  295. -- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
  296. SELECT @parentId := LAST_INSERT_ID();
  297. -- 按钮 SQL
  298. INSERT INTO system_menu(
  299. name, permission, type, sort, parent_id,
  300. path, icon, component, status
  301. )
  302. VALUES (
  303. '回款计划查询', 'crm:receivable-plan:query', 3, 1, @parentId,
  304. '', '', '', 0
  305. );
  306. INSERT INTO system_menu(
  307. name, permission, type, sort, parent_id,
  308. path, icon, component, status
  309. )
  310. VALUES (
  311. '回款计划创建', 'crm:receivable-plan:create', 3, 2, @parentId,
  312. '', '', '', 0
  313. );
  314. INSERT INTO system_menu(
  315. name, permission, type, sort, parent_id,
  316. path, icon, component, status
  317. )
  318. VALUES (
  319. '回款计划更新', 'crm:receivable-plan:update', 3, 3, @parentId,
  320. '', '', '', 0
  321. );
  322. INSERT INTO system_menu(
  323. name, permission, type, sort, parent_id,
  324. path, icon, component, status
  325. )
  326. VALUES (
  327. '回款计划删除', 'crm:receivable-plan:delete', 3, 4, @parentId,
  328. '', '', '', 0
  329. );
  330. INSERT INTO system_menu(
  331. name, permission, type, sort, parent_id,
  332. path, icon, component, status
  333. )
  334. VALUES (
  335. '回款计划导出', 'crm:receivable-plan:export', 3, 5, @parentId,
  336. '', '', '', 0
  337. );
  338. -- ----------------------------
  339. -- 客户管理菜单
  340. -- ----------------------------
  341. -- 菜单 SQL
  342. INSERT INTO system_menu(
  343. name, permission, type, sort, parent_id,
  344. path, icon, component, status, component_name
  345. )
  346. VALUES (
  347. '客户管理', '', 2, 0, 2375,
  348. 'customer', '', 'crm/customer/index', 0, 'CrmCustomer'
  349. );
  350. -- 按钮父菜单ID
  351. -- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
  352. SELECT @parentId := LAST_INSERT_ID();
  353. -- 按钮 SQL
  354. INSERT INTO system_menu(
  355. name, permission, type, sort, parent_id,
  356. path, icon, component, status
  357. )
  358. VALUES (
  359. '客户查询', 'crm:customer:query', 3, 1, @parentId,
  360. '', '', '', 0
  361. );
  362. INSERT INTO system_menu(
  363. name, permission, type, sort, parent_id,
  364. path, icon, component, status
  365. )
  366. VALUES (
  367. '客户创建', 'crm:customer:create', 3, 2, @parentId,
  368. '', '', '', 0
  369. );
  370. INSERT INTO system_menu(
  371. name, permission, type, sort, parent_id,
  372. path, icon, component, status
  373. )
  374. VALUES (
  375. '客户更新', 'crm:customer:update', 3, 3, @parentId,
  376. '', '', '', 0
  377. );
  378. INSERT INTO system_menu(
  379. name, permission, type, sort, parent_id,
  380. path, icon, component, status
  381. )
  382. VALUES (
  383. '客户删除', 'crm:customer:delete', 3, 4, @parentId,
  384. '', '', '', 0
  385. );
  386. INSERT INTO system_menu(
  387. name, permission, type, sort, parent_id,
  388. path, icon, component, status
  389. )
  390. VALUES (
  391. '客户导出', 'crm:customer:export', 3, 5, @parentId,
  392. '', '', '', 0
  393. );