88 lines
4.5 KiB
SQL
88 lines
4.5 KiB
SQL
|
|
SET @bidding_id := (
|
|
SELECT id FROM yz_system_menu
|
|
WHERE path = '/apps/crm/bidding' AND delete_time IS NULL
|
|
LIMIT 1
|
|
);
|
|
|
|
INSERT INTO yz_system_menu
|
|
(pid, title, path, component_path, icon, sort, status, is_visible, views, type, creater, remark)
|
|
SELECT @bidding_id, '我要投标', '/apps/crm/bidding/bid', 'apps/crm/bidding/bid/index.vue',
|
|
'Trophy', 1, 1, 1, '[2]', 2, 'system', '投标方视角:从商机/项目发起投标,中标可转合同/项目'
|
|
FROM DUAL
|
|
WHERE @bidding_id IS NOT NULL
|
|
AND NOT EXISTS (SELECT 1 FROM (SELECT id FROM yz_system_menu WHERE path = '/apps/crm/bidding/bid' AND delete_time IS NULL) x);
|
|
|
|
INSERT INTO yz_system_menu
|
|
(pid, title, path, component_path, icon, sort, status, is_visible, views, type, creater, remark)
|
|
SELECT @bidding_id, '我要招标', '/apps/crm/bidding/tender', 'apps/crm/bidding/tender/index.vue',
|
|
'Document', 2, 1, 1, '[2]', 2, 'system', '招标方视角:发布公告、报名、评标、定标'
|
|
FROM DUAL
|
|
WHERE @bidding_id IS NOT NULL
|
|
AND NOT EXISTS (SELECT 1 FROM (SELECT id FROM yz_system_menu WHERE path = '/apps/crm/bidding/tender' AND delete_time IS NULL) x);
|
|
|
|
INSERT INTO yz_system_menu
|
|
(pid, title, path, component_path, icon, sort, status, is_visible, views, type, creater, remark)
|
|
SELECT @bidding_id, '公共资料库', '/apps/crm/bidding/library', NULL,
|
|
'Folder', 3, 1, 1, '[2]', 1, 'system', '标书模板 + 企业资质'
|
|
FROM DUAL
|
|
WHERE @bidding_id IS NOT NULL
|
|
AND NOT EXISTS (SELECT 1 FROM (SELECT id FROM yz_system_menu WHERE path = '/apps/crm/bidding/library' AND delete_time IS NULL) x);
|
|
|
|
SET @library_id := (
|
|
SELECT id FROM yz_system_menu
|
|
WHERE path = '/apps/crm/bidding/library' AND delete_time IS NULL
|
|
LIMIT 1
|
|
);
|
|
|
|
INSERT INTO yz_system_menu
|
|
(pid, title, path, component_path, icon, sort, status, is_visible, views, type, creater, remark)
|
|
SELECT @library_id, '标书模板', '/apps/crm/bidding/library/template', 'apps/crm/bidding/library/template.vue',
|
|
'Files', 1, 1, 1, '[2]', 2, 'system', '技术标/商务标/综合标模板库'
|
|
FROM DUAL
|
|
WHERE @library_id IS NOT NULL
|
|
AND NOT EXISTS (SELECT 1 FROM (SELECT id FROM yz_system_menu WHERE path = '/apps/crm/bidding/library/template' AND delete_time IS NULL) x);
|
|
|
|
INSERT INTO yz_system_menu
|
|
(pid, title, path, component_path, icon, sort, status, is_visible, views, type, creater, remark)
|
|
SELECT @library_id, '企业资质', '/apps/crm/bidding/library/qualification', 'apps/crm/bidding/library/qualification.vue',
|
|
'Stamp', 2, 1, 1, '[2]', 2, 'system', '证照资质库,临期自动预警'
|
|
FROM DUAL
|
|
WHERE @library_id IS NOT NULL
|
|
AND NOT EXISTS (SELECT 1 FROM (SELECT id FROM yz_system_menu WHERE path = '/apps/crm/bidding/library/qualification' AND delete_time IS NULL) x);
|
|
|
|
INSERT INTO yz_system_menu
|
|
(pid, title, path, component_path, icon, sort, status, is_visible, views, type, creater, remark)
|
|
SELECT @bidding_id, '统计报表', '/apps/crm/bidding/statistics', NULL,
|
|
'DataAnalysis', 4, 1, 1, '[2]', 1, 'system', '招标/投标数据统计'
|
|
FROM DUAL
|
|
WHERE @bidding_id IS NOT NULL
|
|
AND NOT EXISTS (SELECT 1 FROM (SELECT id FROM yz_system_menu WHERE path = '/apps/crm/bidding/statistics' AND delete_time IS NULL) x);
|
|
|
|
SET @stats_id := (
|
|
SELECT id FROM yz_system_menu
|
|
WHERE path = '/apps/crm/bidding/statistics' AND delete_time IS NULL
|
|
LIMIT 1
|
|
);
|
|
|
|
INSERT INTO yz_system_menu
|
|
(pid, title, path, component_path, icon, sort, status, is_visible, views, type, creater, remark)
|
|
SELECT @stats_id, '招标统计', '/apps/crm/bidding/statistics/tender', 'apps/crm/bidding/statistics/tender.vue',
|
|
'PieChart', 1, 1, 1, '[2]', 2, 'system', '招标状态/类型分布、预算与中标金额'
|
|
FROM DUAL
|
|
WHERE @stats_id IS NOT NULL
|
|
AND NOT EXISTS (SELECT 1 FROM (SELECT id FROM yz_system_menu WHERE path = '/apps/crm/bidding/statistics/tender' AND delete_time IS NULL) x);
|
|
|
|
INSERT INTO yz_system_menu
|
|
(pid, title, path, component_path, icon, sort, status, is_visible, views, type, creater, remark)
|
|
SELECT @stats_id, '投标统计', '/apps/crm/bidding/statistics/bid', 'apps/crm/bidding/statistics/bid.vue',
|
|
'Histogram', 2, 1, 1, '[2]', 2, 'system', '投标数量、中标率、费用投入与月度趋势'
|
|
FROM DUAL
|
|
WHERE @stats_id IS NOT NULL
|
|
AND NOT EXISTS (SELECT 1 FROM (SELECT id FROM yz_system_menu WHERE path = '/apps/crm/bidding/statistics/bid' AND delete_time IS NULL) x);
|
|
|
|
SELECT id, pid, title, path, component_path, type, sort
|
|
FROM yz_system_menu
|
|
WHERE delete_time IS NULL AND path LIKE '/apps/crm/bidding%'
|
|
ORDER BY pid, sort;
|