policyTableData.ts 1.36 KB
export interface PolicyConfirmRow {
  storeName: string;
  storeMerchantNo: string;
  businessScene: string;
  productCategory: string;
  mgmtFee1Mode: string;
  mgmtFee1CalcMethod: string;
  mgmtFee1Value: string;
  mgmtFee2Mode: string;
  mgmtFee2CalcMethod: string;
  mgmtFee2Value: string;
  sunshineOnlinePoints: string;
  sunshineCalcMode: string;
}

const BUSINESS_SCENES = ['售后会员权益升级', '售前延保'];
const PRODUCT_CATEGORIES = [
  '太阳膜-原厂',
  '车衣-原厂',
  '精品-小桌板',
  '精品-脚垫',
  '踏板',
  '车衣-副厂',
];

function buildRows(): PolicyConfirmRow[] {
  const rows: PolicyConfirmRow[] = [];
  for (const scene of BUSINESS_SCENES) {
    for (const cat of PRODUCT_CATEGORIES) {
      const calcMode = cat === '车衣-原厂' ? '按整单计算' : '按品类计算';
      rows.push({
        storeName: '巴州强冠东风汽车销售服务有限公司',
        storeMerchantNo: 'SQ20240115',
        businessScene: scene,
        productCategory: cat,
        mgmtFee1Mode: calcMode,
        mgmtFee1CalcMethod: '收入',
        mgmtFee1Value: '5%',
        mgmtFee2Mode: calcMode,
        mgmtFee2CalcMethod: '收入',
        mgmtFee2Value: '5%',
        sunshineOnlinePoints: '是',
        sunshineCalcMode: calcMode,
      });
    }
  }
  return rows;
}

export const mockPolicyRows: PolicyConfirmRow[] = buildRows();