import { setStore, getStore } from '@/utils/store';

export default {
  height:'auto',
  calcHeight: 30,
  tip: false,
  searchShow: true,
  searchMenuSpan: 6,
  border: true,
  index: true,
  viewBtn: true,
  selection: true,
  dialogClickModal: false,
  columnBtn:false,
  column: [
    {
      label: "主键",
      prop: "id",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "租户ID",
      prop: "tenantId",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "所属工厂",
      prop: "factoryId",
      search: getStore({ name: 'userInfo' }).user_category==1,
      hide: getStore({ name: 'userInfo' }).user_category!=1,
      display: getStore({ name: 'userInfo' }).user_category==1,
      type: "tree",
      dicUrl: "/api/pl-factory/factory/select",
      props: {
        label: "name",
        value: "id",
      },
    },
    {
      label: "名称",
      prop: "name",
      type: "input",
      search: true,
      rules: [
        {
          required: true,
          message: '请填写客户名称',
          trigger: 'click',
        },
      ],
    },
    // {
    //   label: "编码",
    //   prop: "code",
    //   type: "input",
    // },
    {
      label: "地址",
      prop: "address",
      type: "input",
    },
    {
      label: "联系方式",
      prop: "phone",
      type: "input",
    },
    {
      label: "联系人",
      prop: "contacts",
      type: "input",
    },
    {
      label: "创建人",
      prop: "createUser",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "创建部门",
      prop: "createDept",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "创建时间",
      prop: "createTime",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
    },
    {
      label: "修改人",
      prop: "updateUser",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "修改时间",
      prop: "updateTime",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "状态",
      prop: "status",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "是否已删除",
      prop: "isDeleted",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
  ]
}
