/** * 事业部 */ export const biz = [ { key: '0', label: '公共开支', code: '' }, { key: '1', label: 'GH事业部', code: '' }, { key: '2', label: '国际事业部', code: '' }, { key: '4', label: '孵化学院', code: '' }, ]; /** * HT 事业部 */ export const bu = [ { key: '91001', value: '91001', label: 'CH事业部' }, { key: '91002', value: '91002', label: '商旅事业部' }, { key: '91003', value: '91003', label: '国际事业部' }, { key: '91004', value: '91004', label: 'CT事业部' }, { key: '91005', value: '91005', label: '德语事业部' }, { key: '91006', value: '91006', label: 'AH亚洲项目组' }, { key: '91009', value: '91009', label: 'Trippest项目组' }, { key: '91010', value: '91010', label: '花梨鹰' }, { key: '91012', value: '91012', label: '西语组' }, ]; /** * HT 销售小组 */ export const deptUnits = [ { key: '43001', value: '43001', label: '英文A组(骆梅玉)' }, { key: '43002', value: '43002', label: '英文B组(王健)' }, { key: '43003', value: '43003', label: '目的地组(杨新玲)' }, { key: '43005', value: '43005', label: '其他' }, ]; /** * 小组 */ export const groups = [ { value: '1,2,28,7,33', key: '1,2,28,7,33', label: 'GH事业部', code: 'GH', children: [1, 2, 28, 7, 33] }, { value: '8,9,11,12,20,21', key: '8,9,11,12,20,21', label: '国际事业部', code: 'INT', children: [8, 9, 11, 12, 20, 21] }, { value: '10,18,16,30', key: '10,18,16,30', label: '孵化学院', code: '', children: [10, 18, 16, 30] }, { value: '1', key: '1', label: 'CH直销', code: '', children: [] }, { value: '2', key: '2', label: 'CH大客户', code: '', children: [] }, { value: '28', key: '28', label: 'AH亚洲项目组', code: 'AH', children: [] }, { value: '33', key: '33', label: 'GH项目组', code: '', children: [] }, { value: '7', key: '7', label: '市场推广', code: '', children: [] }, { value: '8', key: '8', label: '德语', code: '', children: [] }, { value: '9', key: '9', label: '日语', code: '', children: [] }, { value: '11', key: '11', label: '法语', code: '', children: [] }, { value: '12', key: '12', label: '西语', code: '', children: [] }, { value: '20', key: '20', label: '俄语', code: '', children: [] }, { value: '21', key: '21', label: '意语', code: '', children: [] }, { value: '10', key: '10', label: '商旅', code: '', children: [] }, { value: '18', key: '18', label: 'CT', code: 'CT', children: [] }, { value: '16', key: '16', label: 'APP', code: 'APP', children: [] }, { value: '30', key: '30', label: 'Trippest', code: 'TP', children: [] }, { value: '31', key: '31', label: '花梨鹰', code: '', children: [] }, ]; export const groupsMappedByCode = groups.reduce((a, c) => ({ ...a, [String(c.code || c.key)]: c }), {}); export const leafGroup = groups.slice(3); /** * 来源 */ export const sites = [ { value: '2', key: '2', label: 'CHT', code: 'CHT' }, { value: '8', key: '8', label: 'AH', code: 'AH' }, { value: '163', key: '163', label: 'GH', code: 'GH' }, { value: '28', key: '28', label: '客运中国', code: 'GHKYZG' }, { value: '7', key: '7', label: '客运海外', code: 'GHKYHW' }, { value: '172', key: '172', label: 'GH TO B业务', code: 'GHTOB' }, { value: '11,12,20,21,10,18', key: '11,12,20,21,10,18', label: '国际(入境)', code: 'JP,VAC,IT,GM,RU,VC' }, { value: '122,200,211,100,188', key: '122,200,211,100,188', label: '国际(海外)', code: 'VACHW,ITHW,GMHW,RUHW,VCHW' }, { value: '11', key: '11', label: '日语', code: 'JP' }, { value: '12', key: '12', label: '西语', code: 'VAC' }, { value: '122', key: '122', label: '西语海外', code: 'VACHW' }, { value: '20', key: '20', label: '意大利', code: 'IT' }, { value: '200', key: '200', label: '意大利海外', code: 'ITHW' }, { value: '21', key: '21', label: '德语', code: 'GM' }, { value: '211', key: '211', label: '德语海外', code: 'GMHW' }, { value: '10', key: '10', label: '俄语', code: 'RU' }, { value: '100', key: '100', label: '俄语海外', code: 'RUHW' }, { value: '18', key: '18', label: '法语', code: 'VC' }, { value: '188', key: '188', label: '法语海外', code: 'VCHW' }, { value: '16', key: '16', label: 'CT', code: 'CT' }, { value: '30', key: '30', label: 'TP', code: 'trippest' }, { value: '31', key: '31', label: '花梨鹰', code: 'HLY' }, ]; export const dateTypes = [ { key: 'applyDate', value: 'applyDate', label: '提交日期' }, { key: 'ConfirmDate', value: 'ConfirmDate', label: '确认日期' }, { key: 'startDate', value: 'startDate', label: '走团日期' }, ]; /** * 结果字段 */ export const dataFieldOptions = [ { label: '毛利', value: 'SumML', formatter: (v) => `${v / 10000} 万`, nestkey: { p: 'MLKPIrates', v: 'MLKPIvalue' } }, { label: '订单数', value: 'SumOrder', formatter: (v) => v, nestkey: { p: 'OrderKPIrates', v: 'OrderKPIvalue' } }, { label: '成交数', value: 'ConfirmOrder', formatter: (v) => v, nestkey: { p: 'ConfirmOrderKPIrates', v: 'ConfirmOrderKPIvalue' } }, { label: '成交率', value: 'ConfirmRates', formatter: (v) => `${v} %`, nestkey: { p: 'ConfirmRatesKPIrates', v: 'ConfirmRatesKPIvalue' } }, // { label: '人数', value: 'CJPersonNum', formatter: (v) => v }, // todo: more... ]; /** * 结果字段alias */ export const dataFieldAlias = dataFieldOptions.reduce( (a, c) => ({ ...a, [c.value]: { ...c, alias: c.label, formatter: (v) => c.formatter(v) }, [c.nestkey.v]: { ...c, value: c.nestkey.v, alias: `${c.label}目标`, label: `${c.label}目标`, formatter: (v) => c.formatter(v) }, }), {} ); /** * KPI对象 */ export const KPIObjects = [ { key: 'overview', value: 'overview', label: '海纳', data: [{ key: '-1', value: '-1', label: '海纳' }] }, { key: 'bizarea', value: 'bizarea', label: '国内外业务', data: [ { key: 'inside', value: 'inside', label: '国内' }, { key: 'outside', value: 'outside', label: '海外' }, ], }, { key: 'bu', value: 'bu', label: 'HT事业部', data: bu }, { key: 'dept', value: 'dept', label: '小组', data: leafGroup }, { key: 'du', value: 'du', label: '销售小组', data: deptUnits }, { key: 'operator', value: 'operator', label: '顾问' }, { key: 'destination', value: 'destination', label: '目的地' }, { key: 'country', value: 'country', label: '国籍' }, { key: 'guestgrouptype', value: 'guestgrouptype', label: '成员关系', data: [ // todo: { key: 'family', value: 'family', label: '家庭' }, { key: 'solo', value: 'solo', label: 'Solo' }, { key: 'group', value: 'group', label: '组织' }, { key: 'other', value: 'other', label: '其他' }, ] }, ]; export const KPISubjects = [ { key: 'sum_profit', value: 'sum_profit', label: '毛利' }, { key: 'in_order_count', value: 'in_order_count', label: '订单数' }, { key: 'confirm_order_count', value: 'confirm_order_count', label: '成团' }, { key: 'depart_order_count', value: 'depart_order_count', label: '走团' }, { key: 'confirm_rates', value: 'confirm_rates', label: '成型率' }, { key: 'praise_rates', value: 'praise_rates', label: '表扬率' }, // { key: 'first_reply_rates', value: 'first_reply_rates', label: '首报回复率'}, // { key: 'quote_rates', value: 'quote_rates', label: '报价率'}, // { key: 'first_post_time', value: 'first_post_time', label: '订单到首邮发送时间'}, // { key: 'reply_rates_wechat', value: 'reply_rates_wechat', label: '微信回复率'}, // { key: 'reply_rates_wa', value: 'reply_rates_wa', label: 'WA回复率'}, // { key: 'reply_eff_wechat', value: 'reply_eff_wechat', label: '微信回复效率'}, // { key: 'reply_eff_wa', value: 'reply_eff_wa', label: 'WA回复效率'}, { key: 'sum_person_num', value: 'sum_person_num', label: '人数' }, ];