import { FormSchema } from '/@/components/Form/index';
import { incrementUseTypeList } from '/@/api/account';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();
// 基础设置 form
export const remarkschemas: FormSchema[] = [
  {
    field: 'remark',
    component: 'InputTextArea',
    label: t('routes.empower.remark'),
    componentProps: {
      placeholder: t('routes.empower.placeholder'),
      rows: 4,
    },
    colProps: { span: 20 },
  },
];
export const newAddschemas: FormSchema[] = [
  // {
  //   field: 'useType',
  //   component: 'ApiSelect',
  //   required: true,
  //   label: '使用类型',
  //   componentProps: {
  //     // filterOption: onFilterOption,
  //     // showSearch: true,
  //     api: incrementUseTypeList,
  //     labelField: 'name',
  //     valueField: 'id',
  //     immediate: true,
  //   },
  //   itemProps: {
  //     autoLink: false,
  //   },
  //   colProps: {
  //     span: 20,
  //   },
  // },
  {
    field: 'companyName',
    component: 'Select',
    label: '合同所属公司',
    rules: [{ required: true }],
    colProps: {
      span: 20,
    },
    itemProps: {
      autoLink: false,
    },
    componentProps: {
      options: [
        {
          label: '珠海市四维时代网络科技有限公司',
          value: '珠海市四维时代网络科技有限公司',
          key: '珠海市四维时代网络科技有限公司',
        },
        {
          label: '广东四维看看智能设备有限公司',
          value: '广东四维看看智能设备有限公司',
          key: '广东四维看看智能设备有限公司',
        },
        {
          label: '四维看看（香港）有限公司',
          value: '四维看看（香港）有限公司',
          key: '四维看看（香港）有限公司',
        },
        {
          label: '四维看看(北京)数据科技有限公司',
          value: '四维看看(北京)数据科技有限公司',
          key: '四维看看(北京)数据科技有限公司',
        },
      ],
    },
  },
  {
    field: 'businessDept',
    component: 'Select',
    label: '业务部门',
    rules: [{ required: true }],
    colProps: {
      span: 20,
    },
    itemProps: {
      autoLink: false,
    },
    componentProps: {
      options: [
        {
          label: '数字营销事业部',
          value: '数字营销事业部',
          key: '数字营销事业部',
        },
        {
          label: '政企事业部',
          value: '政企事业部',
          key: '政企事业部',
        },
        {
          label: '海外事业部',
          value: '海外事业部',
          key: '海外事业部',
        },
        {
          label: '市场部',
          value: '市场部',
          key: '市场部',
        },
        {
          label: '总经办',
          value: '总经办',
          key: '总经办',
        },
      ],
    },
  },
  {
    field: 'businessName',
    component: 'Input',
    label: '业务员',
    required: true,
    colProps: { span: 20 },
    componentProps: {
      maxlength: 100,
    },
  },
  {
    field: 'customerPayTime',
    component: 'DatePicker',
    label: '客户付款时间',
    required: true,
    colProps: {
      span: 16,
    },
    itemProps: {
      autoLink: false,
    },
    componentProps: {
      // showTime: true, //{ defaultValue: moment('23:59:59', 'HH:mm:ss') }
      valueFormat: 'YYYY-MM-DD',
      // defaultValue: dayjs().add(7, 'day').format('YYYY-MM-DD') + ' 23:59:59',
      format: 'YYYY-MM-DD',
    },
  },
];

export const Addschemas: FormSchema[] = [
  {
    field: 'customerName',
    component: 'Input',
    label: '客户账号',
    required: true,
    colProps: { span: 20 },
  },
  {
    field: 'customerType',
    component: 'Select',
    label: '客户类别',
    required: true,
    colProps: { span: 20 },
    componentProps: {
      options: [
        {
          label: '直销',
          value: 0,
          key: '0',
        },
        {
          label: '经销',
          value: 1,
          key: '1',
        },
      ],
    },
  },
  {
    field: 'endCustomer',
    component: 'Input',
    label: '终端客户',
    required: true,
    colProps: { span: 20 },
  },
  {
    field: 'projectNum',
    component: 'Input',
    label: '项目号',
    required: true,
    colProps: { span: 20 },
  },
];
