import moment from 'moment';
import { rules } from './account-config'

export const modalConfig = {
  formItems: [
    {
      required : true ,
      field: 'name',
      type: 'input',
      label: '计划名称',
      placeholder: '请输入计划名称',
      otherOptions: {
        maxlength:"50",
        showWordLimit:'true'
      }
    },
    {
      required : true ,
      field: 'type',
      type: 'select',
      label: '随访类型',
      placeholder: '请选择随访类型',
      options : []
    },
    {
      required : true ,
      field: 'way',
      type: 'select',
      label: '随访方式',
      placeholder: '请选择随访方式',
      options : []
    },
    {
      required : true ,
      field: 'executionMethod',
      type: 'select',
      label: '执行方式',
      placeholder: '请选择来源',
      options : []
    },
    {
      field: 'indate', //string
      required : true ,
      type: 'datepicker',
      label: '有效期', 
      otherOptions: {
        'range-separator': '至',
        type: 'datetimerange',
        'value-format': 'YYYY-MM-DD HH:mm:ss',
      }
    },
    {
      field: 'describes',
      type: 'textarea',
      colLayout: { span: 16 },
      label: '描述',
      placeholder: '请输入描述内容',
      otherOptions: {
        maxlength:"100",
        showWordLimit:'true'
      }
    },
    // {
    //   required : true ,
    //   field: 'callnum',
    //   prop: 'callnum',
    //   type: 'input',
    //   label: '来电号码',
    //   placeholder: '请输入来电号码',
    //   rules:[{validator:(rule,value,callback)=>{
    //       const reg = /^[0-9]{6,11}$/
    //       if(reg.test(value)) {
    //         callback()
    //       }else{
    //         callback(new Error('请输入正确的格式'))
    //       }
    //     }
    //   }]
    // },

    

  ],
  colLayout: { span: 8 },
  itemStyle: {},
  rules:rules
  
}
