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: false,
  dialogClickModal: false,
  labelWidth:160,
  columnBtn:false,
  addBtn:false,
  editBtn:false,
  delBtn: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: "clientId",
      type: "input",
      search: true,
      type: "tree",
      dicUrl: "/api/pl-client/client/select",
      props: {
        label: "name",
        value: "id",
      },
    },
    {
      label: "批次id",
      prop: "batchId",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "批次号",
      prop: "batchNo",
      type: "input",
      search: true,
    },
    {
      label: "产品型号id",
      prop: "productModelId",
      type: "select",
      hide: true,
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "产品名称",
      prop: "productName",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      search: true,
    },
    {
      label: "产品型号",
      prop: "productModel",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      search: true,
    },
    {
      label: "产品编号",
      prop: "qrCode",
      type: "input",
      search: true,
    },
    {
      label: "正面图片",
      prop: "frontImg",
      type: 'upload',
      listType: 'picture-img',
      dataType:"String",
      hide: true,
    },
    {
      label: "背面图片",
      prop: "backImg",
      type: 'upload',
      listType: 'picture-img',
      dataType:"String",
      hide: true,
    },
    {
      label: "扫码日期",
      prop: "scanDate",
      type: "input",
    },
    {
      label: "水冷",
      prop: "waterCooling",
      type: "input",
    },
    {
      label: "气密",
      prop: "airtight",
      type: "input",
    },
    {
      label: "订单号",
      prop: "orderNo",
      type: "input",
    },
    // {
    //   label: "出货批次",
    //   prop: "shipmentBatch",
    //   type: "input",
    // },
    {
      label: "冷板二维码",
      prop: "coldQrCode",
      type: "input",
    },
    {
      label: "检测结果(1合格 2不合格)",
      prop: "checkResult",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "状态",
      prop: "status",
      addDisplay: false,
      editDisplay: false,
      type:"select",
      dataType:"number",
      dicUrl:"/blade-system/dict-biz/dictionary?code=order_status",
      props:{label:"dictValue",value:"dictKey"},
    },
    {
      label: "入库时间",
      prop: "inStockDate",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      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: "isDeleted",
      type: "input",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: false,
      hide: true,
    },
    {
      label: "扫码日期",
      prop: "scanDateArr",
      search: true,
      searchType: "daterange",
      format: "YYYY-MM-DD",
      valueFormat: "YYYY-MM-DD",
      dataType:'string',
      searchRange:true,
      addDisplay: false,
      editDisplay: false,
      hide: true
    },
    {
      label: "创建时间",
      prop: "createTimeArr",
      search: true,
      searchType: "daterange",
      format: "YYYY-MM-DD",
      valueFormat: "YYYY-MM-DD",
      dataType:'string',
      searchRange:true,
      addDisplay: false,
      editDisplay: false,
      hide: true
    },
  ]
}
