constant.js 2.65 KB
// 模板类型:1-单延保 2-权益延保 3-广联权益
export const TEMPLATE_TYPE = {
	SINGLE: 1,
	EQUITY_EXTENDED: 2,
	GUANGLIAN: 3
}

// 角色
export const ROLE = {
	SUPER: 'super',
	STAFF: 'staff',
	OTHER: 'other'
}

// 基础表单字段配置(hwObjArray/hwOhterObjArray/otherObjArray 共用)
const createField = (label, key, required, extra = {}) => ({
	label,
	key,
	type: 'number',
	required,
	min: 0,
	max: 100,
	inputPlaceholder: '',
	...extra
})

export const BASE_FORM_FIELDS = [
	createField('店端实际交车数', 'deliveryCount', true),
	createField('店端总未触客数', 'notDeliveryCount', true),
	createField('延保实际售前触客数', 'extendedWarrantyToShopCount', true),
	createField('延保实际售后触客数', 'afterSaleExtendedWarrantyToShopCount', false),
	createField('未触客返店人数', 'notDeliveryReturnCount', false)
]

export const createBaseFormArray = () =>
	BASE_FORM_FIELDS.map(f => ({ ...f }))

// 1-流量正常 2-流量不足 3-流量下降 4-门店关系欠佳
export const trafficProblemList = [
  { confId: 1, confName: '流量正常' },
  { confId: 2, confName: '流量不足' },
  { confId: 3, confName: '流量下降' },
  { confId: 4, confName: '门店关系欠佳' }
]

// 11-技能正常 12-驻店关系提升技巧 13-流量提升技巧 14-话术提升技巧
export const skillProblemList = [
  { confId: 11, confName: '技能正常' },
  { confId: 12, confName: '驻店关系提升技巧' },
  { confId: 13, confName: '流量提升技巧' },
  { confId: 14, confName: '话术提升技巧' }
]

//  21-套餐正常 22-套餐不合适客户 23-需要增加套餐 24-套餐价格过高
export const packageProblemList = [
  { confId: 21, confName: '套餐正常' },
  { confId: 22, confName: '套餐不合适客户' },
  { confId: 23, confName: '需要增加套餐' },
  { confId: 24, confName: '套餐价格过高' }
]

export const formData = [
  {
    label: '流量问题',
    isMult: true,
    name: 'trafficProblemList',
    optionList: trafficProblemList,
    selectedList: [],
    optionId: 'confId',
    optionLabel: 'confName',
    optionsName: 'trafficProblemList'
  },
  {
    label: '技能问题',
    isMult: true,
    name: 'skillProblemList',
    optionList: skillProblemList,
    selectedList: [],
    optionId: 'confId',
    optionLabel: 'confName',
    optionsName: 'skillProblemList'
  },
  {
    label: '套餐问题',
    isMult: true,
    name: 'packageProblemList',
    optionList: packageProblemList,
    selectedList: [],
    optionId: 'confId',
    optionLabel: 'confName',
    optionsName: 'packageProblemList'
  }
]