import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '页数',
    align:"center",
    dataIndex: 'page'
   },
   {
    title: '部件名',
    align:"center",
    dataIndex: 'component'
   },
   {
    title: '日期',
    align:"center",
    dataIndex: 'currentdate',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text)
    },
   },
   {
    title: '中试确认',
    align:"center",
    dataIndex: 'confirmTrial'
   },
   {
    title: '品质确认',
    align:"center",
    dataIndex: 'confirmQuality'
   },
   {
    title: '研发确认',
    align:"center",
    dataIndex: 'confirmDevelop'
   },
   {
    title: '关联工单id',
    align:"center",
    dataIndex: 'templateId_dictText'
   },
   {
    title: '关联工序卡id',
    align:"center",
    dataIndex: 'stepId_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '页数',
    field: 'page',
    component: 'Input',
  },
  {
    label: '部件名',
    field: 'component',
    component: 'Input',
  },
  {
    label: '日期',
    field: 'currentdate',
    component: 'DatePicker',
  },
  {
    label: '中试确认',
    field: 'confirmTrial',
    component: 'Input',
  },
  {
    label: '品质确认',
    field: 'confirmQuality',
    component: 'Input',
  },
  {
    label: '研发确认',
    field: 'confirmDevelop',
    component: 'Input',
  },
  {
    label: '关联工单id',
    field: 'templateId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"workorder_template,task_no,id"
     },
  },
  {
    label: '关联工序卡id',
    field: 'stepId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"workorder_step,name,id"
     },
  },
];
