diff --git a/sql/mysql/crm_menu.sql b/sql/mysql/crm_menu.sql index d85c9496bc..d3ef9418ad 100644 --- a/sql/mysql/crm_menu.sql +++ b/sql/mysql/crm_menu.sql @@ -117,6 +117,61 @@ VALUES ( '线索导出', 'crm:clue:export', 3, 5, @parentId, '', '', '', 0 ); +-- 菜单 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status, component_name +) +VALUES ( + '联系人', '', 2, 0, ${table.parentMenuId}, + 'contact', '', 'crm/contact/index', 0, 'Contact' + ); + +-- 按钮父菜单ID +-- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 +SELECT @parentId := LAST_INSERT_ID(); + +-- 按钮 SQL +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '联系人查询', 'crm:contact:query', 3, 1, @parentId, + '', '', '', 0 + ); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '联系人创建', 'crm:contact:create', 3, 2, @parentId, + '', '', '', 0 + ); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '联系人更新', 'crm:contact:update', 3, 3, @parentId, + '', '', '', 0 + ); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '联系人删除', 'crm:contact:delete', 3, 4, @parentId, + '', '', '', 0 + ); +INSERT INTO system_menu( + name, permission, type, sort, parent_id, + path, icon, component, status +) +VALUES ( + '联系人导出', 'crm:contact:export', 3, 5, @parentId, + '', '', '', 0 + ); -- ---------------------------- -- 合同菜单 diff --git a/yudao-ui-admin/src/api/crm/contact/contact.js b/yudao-ui-admin/src/api/crm/contact/contact.js new file mode 100644 index 0000000000..fd6e0c1eea --- /dev/null +++ b/yudao-ui-admin/src/api/crm/contact/contact.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建crm联系人 +export function createContact(data) { + return request({ + url: '/crm/contact/create', + method: 'post', + data: data + }) +} + +// 更新crm联系人 +export function updateContact(data) { + return request({ + url: '/crm/contact/update', + method: 'put', + data: data + }) +} + +// 删除crm联系人 +export function deleteContact(id) { + return request({ + url: '/crm/contact/delete?id=' + id, + method: 'delete' + }) +} + +// 获得crm联系人 +export function getContact(id) { + return request({ + url: '/crm/contact/get?id=' + id, + method: 'get' + }) +} + +// 获得crm联系人分页 +export function getContactPage(query) { + return request({ + url: '/crm/contact/page', + method: 'get', + params: query + }) +} + +// 导出crm联系人 Excel +export function exportContactExcel(query) { + return request({ + url: '/crm/contact/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/yudao-ui-admin/src/views/crm/contact/index.vue b/yudao-ui-admin/src/views/crm/contact/index.vue new file mode 100644 index 0000000000..acde3615d6 --- /dev/null +++ b/yudao-ui-admin/src/views/crm/contact/index.vue @@ -0,0 +1,316 @@ + + +