/*
 *    Copyright (c) 2018-2025, cyweb All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 */

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  column: [
	  {
      label: '主键',
      prop: 'id',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
	  {
      label: '创建人',
      prop: 'createBy',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
	  {
      label: '创建时间',
      prop: 'createTime',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
	  {
      label: '更新人',
      prop: 'updateBy',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
	  {
      label: '更新时间',
      prop: 'updateTime',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
	  {
      label: '删除标记',
      prop: 'delFlag',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
	  {
      label: '教材ISBN',
      prop: 'isbn',
      span: 24,
      labelWidth: 120,
      search:true
      // rules: [{
      //   required: true,
      //   message: "请填写教材ISBN",
      //   trigger: "blur"
      // }]
    },
	  {
      label: '教材名称',
      prop: 'textbookName',
      span: 24,
      labelWidth: 120,
      search:true,
      rules: [{
        required: true,
        message: "请填写教材名称",
        trigger: "blur"
      }]
    },
    {
      label: '教材编码',
      prop: 'serialNo',
      span: 24,
      labelWidth: 120,
      search:true,
      rules: [{
        required: true,
        message: "请填写教材编码",
        trigger: "blur"
      }]
    },

	  {
      label: '出版社',
      prop: 'publisher',
      // type:"select",
      span: 12,
      labelWidth: 120,
      formslot:true

      // dicUrl: '/ems/textbookpublisher/list',
      // props: {
      //   label: 'publisherName',
      //   value: 'publisherName'
      // }
    },
	  {
      label: '作者',
      prop: 'author',
      span: 12,
      labelWidth: 120,
      search:true,
      // rules: [{
      //   required: true,
      //   message: "请填写作者",
      //   trigger: "blur"
      // }]
    },
	  {
      label: '版别',
      prop: 'version',
      span: 12,
      labelWidth: 120,
      // rules: [{
      //   required: true,
      //   message: "请填写版别",
      //   trigger: "blur"
      // }]
    },
	  {
      label: '单价',
      prop: 'price',
      span: 12,
      labelWidth: 120,
      rule:'',
      type:'number',
      precision:2,
      // rules: [{
      //   required: true,
      //   message: "请填写单价",
      //   trigger: "blur"
      // }]
    },
	  {
      label: '库存',
      prop: 'stock',
      span: 12,
      labelWidth: 120,
      type:'number',
      hide: true,
      // rules: [{
      //   required: true,
      //   message: "请填写库存",
      //   trigger: "blur"
      // }]
    },
	  {
      label: '码洋',
      prop: 'maPrice',
      span: 12,
      labelWidth: 120,
      hide: true,
      // rules: [{
      //   required: true,
      //   message: "请填写码洋",
      //   trigger: "blur"
      // }]
    },
	  {
      label: '教材类型',
      prop: 'textbookType',
      type:"select",
      search:true,
      span: 12,
      labelWidth: 120,
      hide: true,
      dicUrl: '/ems/textbooktype/list',
      props: {
        label: 'textbookTypeName',
        value: 'id'
      }
    },
	  {
      label: '出版日期',
      prop: 'publishDate',
      span: 12,
      labelWidth: 120,
      // rules: [{
      //   required: true,
      //   message: "请填写出版日期",
      //   trigger: "blur"
      // }]
    },
	  {
      hide: true,
      label: '适用对象',
      prop: 'fitObject',
      type:"select",
      search:true,
      span: 12,
      labelWidth: 120,
      dicUrl: '/ems/textbookfitobject/list',
      props: {
        label: 'objectName',
        value: 'id'
      }
    },
	  {
      hide: true,
      label: '适用专业',
      prop: 'fitMajor',
      search:true,
      span: 12,
      labelWidth: 120,
      // rules: [{
      //   required: true,
      //   message: "请填写适用对象",
      //   trigger: "blur"
      // }]
    },
	  {
      hide: true,
      label: '书架号',
      prop: 'bookPlace',
      span: 12,
      labelWidth: 120,
      // rules: [{
      //   required: true,
      //   message: "请填写适用对象",
      //   trigger: "blur"
      // }]
    },
	  {
      hide: true,
      label: '实际单价',
      prop: 'actPrice',
      span: 12,
      labelWidth: 120,
      type:'number',
      // rules: [{
      //   required: true,
      //   message: "请填写适用对象",
      //   trigger: "blur"
      // }]
    },
	  {
      hide: true,
      label: '是否样书',
      prop: 'isDemoBook',
      type:"select",
      dicUrl: '/admin/dict/item/type/yes_no',
      search:true,
      span: 12,
      labelWidth: 120,
      // rules: [{
      //   required: true,
      //   message: "请选择是否为样书",
      //   trigger: "blur"
      // }]
    },
	  {
      hide: true,
      label: '供应商',
      prop: 'supplier',

      type:"select",
      span: 12,
      labelWidth: 120,
      dicUrl: '/ems/textbooksupplier/list',
      props: {
        label: 'supplierName',
        value: 'id'
      },

    },
    {
      label: '备注',
      prop: 'remarks',
      type:"textarea",
      span: 24,
      labelWidth: 120
    }]
}
