/**
 * 警告: 由于本页面watch中,监听"form.qylx", 并对obj.column[6](即以下"服务上级组织")做了处理, 在本文件中添加列, 需要调整逻辑中的索引
 *
 */

import {provincesData} from '@/const/abbreviationsProvinces.js';
export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  searchMenuSpan: 6,
  delBtn: false,
  addBtn: false,
  editBtn: false,
  dialogClickModal: false,
  labelWidth: 200,
  column: [
    {
      type: 'input', //0
      label: '',
      prop: 'id',
      hide: true,
      editDisplay: false,
      addDisplay: false
    },
    {
      type: 'select', //1
      label: '药企',
      prop: 'drugEntId',
      dicUrl: '/admin/wmdadrugent/listBySel',
      props: {
        label: 'entname',
        value: 'id'
      },
      hide: true,
      editDisplay: false,
      addDisplay: false
    },

    {
      type: 'select', //2
      label: '代理商',
      prop: 'temp2',
      hide: true,
      editDisplay: false,
      addDisplay: false,
      span: 24,
      dicUrl: '/admin/wmdaagent/list?agentTypeId=1',
      props: {
        label: 'gsmc',
        value: 'id'
      }
    },
    {
      type: 'input', //3
      label: '企业名称',
      prop: 'gsmc',
      search: true,
      searchLabelWidth: 80,
      span: 18,
      rules: [
        {
          required: true,
          message: '请输入企业名称'
        },
        {
          min: 1,
          max: 60,
          message: '长度在 1-60 个字符',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '统一社会信用代码', //4
      prop: 'zjNumber',
      type: 'input',
      search: true,
      searchLabelWidth: 160,
      searchSpan: 8,
      span: 18,
      rules: [
        {
          required: true,
          pattern: /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/g,
          message: '请输入正确的统一社会信用代码'
        }
      ]
    },
    {
      type: 'input',
      label: '简称',
      prop: 'abbr',
      span: 18,
      rules: [
        {
          required: true,
          message: '请输入简称'
        },
        {
          min: 1,
          max: 100,
          message: '长度在 1-100 个字符',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '省份简称',
      prop: 'provAbbr'
    },
    {
      type: 'select',
      label: '省份简称',
      prop: 'provAbbrList',
      hide: true,
      span: 18,
      dicData: provincesData,
      multiple: true,
      rules: [
        {
          required: true,
          message: '请输入省份简称',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '所属区域',
      prop: 'areaCodes',
      addDisplay: false,
      editDisplay: false,
      searchSpan: 8,
      hide: true,
      search: true,
      searchslot: true
    },
    {
      type: 'select', //5
      label: '企业类型',
      prop: 'qylx',
      span: 18,
      dicUrl: '/admin/dict/type/qylx',
      rules: [
        {
          required: true,
          message: '请选择企业类型',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '服务上级组织', //6
      prop: 'extDrugEnt',
      type: 'select',
      formslot: true,
      slot: true,
      hide: true,
      sortable: true,
      multiple: true,
      disabled: false,
      editDisplay: false,
      addDisplay: false,
      span: 18
    },

    {
      type: 'input',
      label: '服务上级组织 ',
      prop: 'temp1',
      span: 18,
      editDisplay: false,
      addDisplay: false
    },
    {
      type: 'select',
      label: '启停状态',
      prop: 'enableFlag',
      span: 18,
      dicUrl: '/admin/dict/type/enable_disabled',
      rules: [
        {
          required: true,
          message: '请选择状态',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '所属区域',
      prop: 'areaCodesData',
      type: 'select',
      hide: true,
      formslot: true,
      slot: true,
      overHidden: true,
      span: 18,
      rules: [
        {
          required: true,
          message: '请选择所属区域',
          trigger: 'blur'
        }
      ]
    },

    {
      label: '营业执照',
      hide: true,
      prop: 'yyzz',
      type: 'upload',
      action: '/admin/sys-file/upload',
      propsHttp: {
        res: 'data'
      },
      listType: 'picture-img',
      dataType: 'string',
      tip: '上传同步至文件服务器',
      rules: [
        {
          required: true,
          message: '请上传营业执照'
        }
      ]
    },
    {
      label: '社保缴纳证明',
      prop: 'sbjnzm',
      type: 'upload',
      loadText: '附件上传中，请稍等',
      span: 24,
      propsHttp: {
        res: 'data'
      },
      tip: '上传同步至文件服务器',
      action: '/admin/sys-file/upload',
      hide: true,
      listType: 'picture-card',
      dataType: 'string',
      rules: [
        {
          required: true,
          message: '请上传社保缴纳证明'
        }
      ]
    },
    {
      label: '身份证照片（人面像）',
      prop: 'frsfzzmZm',
      hide: true,
      type: 'upload',
      loadText: '附件上传中，请稍等',
      span: 24,
      propsHttp: {
        res: 'data'
      },
      tip: '上传同步至文件服务器',
      action: '/admin/sys-file/upload',
      listType: 'picture-img',
      dataType: 'string',
      rules: [
        {
          required: true,
          message: '请上传法人身份证证明-正面'
        }
      ]
    },
    {
      label: '身份证照片（国徽面）',
      prop: 'frsfzzmBm',
      hide: true,
      type: 'upload',
      loadText: '附件上传中，请稍等',
      span: 24,
      propsHttp: {
        res: 'data'
      },
      tip: '上传同步至文件服务器',
      action: '/admin/sys-file/upload',
      listType: 'picture-img',
      dataType: 'string',
      rules: [
        {
          required: true,
          message: '请上传法人身份证证明-背面'
        }
      ]
    },
    {
      label: '法人手持身份证明',
      prop: 'frsfzzmSc',
      hide: true,
      type: 'upload',
      loadText: '附件上传中，请稍等',
      span: 24,
      propsHttp: {
        res: 'data'
      },
      tip: '上传同步至文件服务器',
      action: '/admin/sys-file/upload',
      listType: 'picture-img',
      dataType: 'string',
      rules: [
        {
          required: true,
          message: '请上传法人身份证证明-手持'
        }
      ]
    },
    {
      type: 'input',
      label: '创建时间',
      prop: 'createTime',
      hide: true,
      editDisplay: false,
      addDisplay: false
    },
    {
      type: 'input',
      label: '更新时间',
      prop: 'updateTime',
      hide: true,
      editDisplay: false,
      addDisplay: false
    }
  ]
};

export const teamTableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  searchMenuSpan: 6,
  addBtn: false,
  delBtn: false,
  editBtn: false,
  dialogClickModal: false,
  labelWidth: 200,
  column: [
    {
      type: 'input', //3
      label: '区域名称',
      prop: 'gsmc',
      search: true,
      searchLabelWidth: 80,
      span: 18,
      rules: [
        {
          required: true,
          message: '请输入团队名称'
        },
        {
          min: 1,
          max: 60,
          message: '长度在 1-60 个字符',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '结算渠道类型',
      prop: 'subjectType',
      type: 'select',
      dicUrl: '/admin/dict/type/subject_location',
      span: 13,
      multiple: true,
      editDisplay: false,
      addDisplay: false
    },
    {
      label: '区域代码（负责人身份证号）', //4
      prop: 'zjNumber',
      type: 'input',
      search: true,
      searchLabelWidth: 160,
      span: 18,
      rules: [{required: true, message: '请输入负责人身份证号码'}]
    },
    {
      label: '所属区域',
      prop: 'areaCodes',
      addDisplay: false,
      editDisplay: false,
      searchSpan: 8,
      hide: true,
      search: true,
      searchslot: true
    },
    {
      type: 'input',
      label: '简称',
      prop: 'abbr',
      span: 18,
      rules: [
        {
          required: true,
          message: '请输入简称'
        },
        {
          min: 1,
          max: 100,
          message: '长度在 1-100 个字符',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '省份简称',
      prop: 'provAbbr'
    },
    {
      type: 'select',
      label: '省份简称',
      hide: true,
      prop: 'provAbbrList',
      span: 18,
      dicData: provincesData,
      multiple: true,
      rules: [
        {
          required: true,
          message: '请输入省份简称',
          trigger: 'blur'
        }
      ]
    },
    {
      type: 'select', //5
      label: '企业类型',
      prop: 'qylx',
      span: 18,
      dicUrl: '/admin/dict/type/qylx',
      rules: [
        {
          required: true,
          message: '请选择企业类型',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '服务上级组织', //6
      prop: 'extDrugEnt',
      type: 'select',
      formslot: true,
      slot: true,
      hide: true,
      sortable: true,
      multiple: true,
      disabled: false,
      editDisplay: false,
      addDisplay: false,
      span: 18
    },
    {
      type: 'input',
      label: '服务上级组织 ',
      prop: 'temp1',
      span: 24,
      editDisplay: false,
      addDisplay: false
    },
    {
      label: '权限限制',
      prop: 'deptPermissions',
      type: 'select',
      span: 18,
      dicUrl: '/admin/dict/type/dept_permission_type',
      multiple: true
    },
    {
      type: 'select',
      label: '启停状态',
      prop: 'enableFlag',
      span: 18,
      dicUrl: '/admin/dict/type/enable_disabled',
      rules: [
        {
          required: true,
          message: '请选择状态',
          trigger: 'blur'
        }
      ]
    },
    {
      label: '所属区域',
      prop: 'areaCodesData',
      type: 'select',
      hide: true,
      formslot: true,
      slot: true,
      overHidden: true,
      span: 18,
      rules: [
        {
          required: true,
          message: '请选择所属区域',
          trigger: 'blur'
        }
      ]
    },
    // {
    //   type: "select",
    //   label: "财务复核方式",
    //   prop: "financialReviewType",
    //   value: "AUTO",
    //   hide: true,
    //   span: 18,
    //   dicUrl: "/admin/dict/type/financial_review_type",
    //   rules: [
    //     {
    //       required: true,
    //       message: "请选择财务复核方式",
    //       trigger: "blur"
    //     }
    //   ]
    // },
    {
      label: '负责人身份证照片-正面：',
      prop: 'frsfzzmZm',
      hide: true,
      type: 'upload',
      loadText: '附件上传中，请稍等',
      span: 24,
      propsHttp: {
        res: 'data'
      },
      tip: '上传同步至文件服务器',
      action: '/admin/sys-file/upload',
      listType: 'picture-img',
      dataType: 'string',
      rules: [
        {
          required: true,
          message: '请上传负责人身份证照片-正面：'
        }
      ]
    },
    {
      label: '负责人身份证照片-反面：',
      prop: 'frsfzzmBm',
      hide: true,
      type: 'upload',
      loadText: '附件上传中，请稍等',
      span: 24,
      propsHttp: {
        res: 'data'
      },
      tip: '上传同步至文件服务器',
      action: '/admin/sys-file/upload',
      listType: 'picture-img',
      dataType: 'string',
      rules: [
        {
          required: true,
          message: '负责人身份证照片-反面'
        }
      ]
    }
  ]
};
