crm_menu.sql 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  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. -- 菜单 SQL
  226. INSERT INTO system_menu(
  227. name, permission, type, sort, parent_id,
  228. path, icon, component, status, component_name
  229. )
  230. VALUES (
  231. '回款管理', '', 2, 0, 2375,
  232. 'receivable', '', 'crm/receivable/index', 0, 'Receivable'
  233. );
  234. -- 按钮父菜单ID
  235. -- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
  236. SELECT @parentId := LAST_INSERT_ID();
  237. -- 按钮 SQL
  238. INSERT INTO system_menu(
  239. name, permission, type, sort, parent_id,
  240. path, icon, component, status
  241. )
  242. VALUES (
  243. '回款管理查询', 'crm:receivable:query', 3, 1, @parentId,
  244. '', '', '', 0
  245. );
  246. INSERT INTO system_menu(
  247. name, permission, type, sort, parent_id,
  248. path, icon, component, status
  249. )
  250. VALUES (
  251. '回款管理创建', 'crm:receivable:create', 3, 2, @parentId,
  252. '', '', '', 0
  253. );
  254. INSERT INTO system_menu(
  255. name, permission, type, sort, parent_id,
  256. path, icon, component, status
  257. )
  258. VALUES (
  259. '回款管理更新', 'crm:receivable:update', 3, 3, @parentId,
  260. '', '', '', 0
  261. );
  262. INSERT INTO system_menu(
  263. name, permission, type, sort, parent_id,
  264. path, icon, component, status
  265. )
  266. VALUES (
  267. '回款管理删除', 'crm:receivable:delete', 3, 4, @parentId,
  268. '', '', '', 0
  269. );
  270. INSERT INTO system_menu(
  271. name, permission, type, sort, parent_id,
  272. path, icon, component, status
  273. )
  274. VALUES (
  275. '回款管理导出', 'crm:receivable:export', 3, 5, @parentId,
  276. '', '', '', 0
  277. );
  278. -- ----------------------------
  279. -- 回款计划菜单
  280. -- ----------------------------
  281. -- 菜单 SQL
  282. INSERT INTO system_menu(
  283. name, permission, type, sort, parent_id,
  284. path, icon, component, status, component_name
  285. )
  286. VALUES (
  287. '回款计划管理', '', 2, 0, 2375,
  288. 'receivable-plan', '', 'crm/receivablePlan/index', 0, 'ReceivablePlan'
  289. );
  290. -- 按钮父菜单ID
  291. -- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码
  292. SELECT @parentId := LAST_INSERT_ID();
  293. -- 按钮 SQL
  294. INSERT INTO system_menu(
  295. name, permission, type, sort, parent_id,
  296. path, icon, component, status
  297. )
  298. VALUES (
  299. '回款计划查询', 'crm:receivable-plan:query', 3, 1, @parentId,
  300. '', '', '', 0
  301. );
  302. INSERT INTO system_menu(
  303. name, permission, type, sort, parent_id,
  304. path, icon, component, status
  305. )
  306. VALUES (
  307. '回款计划创建', 'crm:receivable-plan:create', 3, 2, @parentId,
  308. '', '', '', 0
  309. );
  310. INSERT INTO system_menu(
  311. name, permission, type, sort, parent_id,
  312. path, icon, component, status
  313. )
  314. VALUES (
  315. '回款计划更新', 'crm:receivable-plan:update', 3, 3, @parentId,
  316. '', '', '', 0
  317. );
  318. INSERT INTO system_menu(
  319. name, permission, type, sort, parent_id,
  320. path, icon, component, status
  321. )
  322. VALUES (
  323. '回款计划删除', 'crm:receivable-plan:delete', 3, 4, @parentId,
  324. '', '', '', 0
  325. );
  326. INSERT INTO system_menu(
  327. name, permission, type, sort, parent_id,
  328. path, icon, component, status
  329. )
  330. VALUES (
  331. '回款计划导出', 'crm:receivable-plan:export', 3, 5, @parentId,
  332. '', '', '', 0
  333. );