export function setFormItems(self) {
  let _this = self
  return [
    {
      type: 'input',
      name: 'operatorcode',
      label: '工号',
      value: '',
    },
    {
      type: 'buttonGroup',
      style: { textAlign: 'left' },
      options: [
        {
          value: '查询',
          icon: 'search',
          btnType: 'primary',
          style: 'margin-left:10px',
          htmlType: 'submit'
        },
        {
          value: '重置',
          icon: 'redo',
          style: 'margin-left:10px',
          on: {
            click: () => {
              self.$refs.formTarget.form.resetFields()
            }
          }
        }
      ]
    }
  ]
}

export function detailFormItems(self) {
  let _this = self
  return [
    {
      type: 'input',
      hidden: true,
      name: 'printrouteid',
      label: '打印机ID',
      value: '',
    },
     {
      type: 'input',
      hidden: true,
      name: 'branchid',
      label: '仓号',
      value: '',
    },
    {
      type: 'input',
      hidden: false,
      name: 'printername',
      required:true,
      label: '打印机名称',
      value: '',
    },
    {
      type: 'input',
      hidden: false,
      name: 'operatorcode',
      required:true,
      label: '工号',
      value: '',
    },
    
    {
      type: 'input',
      hidden: false,
      name: 'operatorname',
      required:true,
      label: '人员名称',
      value: '',
    },
    {
      type: 'radio',
      name: 'status',
      label: '是否启用',
      required:true,
      value: 1,
      options: [
        {
          label: '是',
          value: 1,
        },
        {
          label: '否',
          value: 0,
        },
      ],
    },
    {
      type: 'textarea',
      hidden: false,
      name: 'remark',
      label: '备注',
      value: '',
    },
    // {
    //   type: 'input',
    //   hidden: false,
    //   name: 'createdate',
    //   label: '创建时间',
    //   value: '',
    // },
    // {
    //   type: 'input',
    //   hidden: false,
    //   name: 'lastmodifydate',
    //   label: '最后修改时间',
    //   value: '',
    // },
  ]
}
export const tableColumnsConfig = [
  {
    title: 'printrouteid',
    hidden: true,
    dataIndex: 'printrouteid',
  },
  {
    title: '仓编码',
    width: 150,
    dataIndex: 'branchid',
    className: 'v_top',
  },
  {
    title: '工号',
    width: 100,
    dataIndex: 'operatorcode',
    className: 'v_top',
  },
  {
    title: '打印机名称',
    width: 100,
    dataIndex: 'printername',
    className: 'v_top',
  },
  {
    title: '状态',
    width: 100,
    dataIndex: 'status',
    scopedSlots: { customRender: 'status' },
  },
  {
    title: '创建人',
    width: 150,
    dataIndex: 'createby',
    className: 'v_top',
  },
  {
    dataIndex: 'lastmodifyby',
    width: 150,
    title: '最后修改人',
  },
  {
    title: '备注',
    dataIndex: 'remark',
    className: 'v_top',
  },
  {
    title: '操作',
    key: 'operate',
    align: 'center',
    fixed: 'right',
    width: 150,
    scopedSlots: { customRender: 'action' },
  },
]
