/*
 *    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,
  dialogHeight:700,
  menuWidth:250,
  dic: [],
  column: [
	  // {
    //   label: '主键',
    //   prop: 'id'
    // },
	  // {
    //   label: '创建人',
    //   prop: 'createBy'
    // },
	  // {
    //   label: '创建时间',
    //   prop: 'createTime'
    // },
	  // {
    //   label: '更新人',
    //   prop: 'updateBy'
    // },
	  // {
    //   label: '更新时间',
    //   prop: 'updateTime'
    // },
	  // {
    //   label: '删除标记',
    //   prop: 'delFlag'
    // },
	  // {
    //   label: '租户ID',
    //   prop: 'tenantId'
    // },
	  // {
    //   label: '备注',
    //   prop: 'remarks'
    // },
    {
      label: '年份',
      prop: 'year',
      search:true,
      hide:true,
      addDisplay:false,
      editDisplay:false,
      type:'year',
      valueFormat:'yyyy'
    },
	  {
      label: '起草部门',
      fixed:true,
      prop: 'deptCode',
      labelWidth:124,
      searchFilterable:true,
      search:true,
      addDisplay:false,
      editDisabled:true,
      type:'select',
      dicUrl: '/basic/basicdept/getDeptListByLevelTwo',
      props: {
        label: 'deptName',
        value: 'deptCode'
      },
      rules: [{
        required: true,
        message: "请选择起草部门",
        trigger: "blur"
      }],
      minWidth:110
    },
	  {
      label: '起草部门',
      prop: 'deptName',
      hide:true,
      addDisplay:false,
      editDisplay:false
    },
	  {
      label: '合同编号',
      prop: 'contractNo',
      fixed:true,
      search:true,
      sortable:true,
      labelWidth:124,
      addDisplay:false,
      editDisabled:true,
      rules: [{
        required: true,
        message: "请输入合同编号",
        trigger: "blur"
      }],
      minWidth:170
    },
	  {
      label: '合同名称',
      prop: 'contractName',
      fixed:true,
      search:true,
      labelWidth:124,
      rules: [{
        required: true,
        message: "请输入合同名称",
        trigger: "blur"
      }],
      minWidth:250,
    },
	  {
      label: '合同类型',
      prop: 'contractType',
      labelWidth:124,
      search:true,
      filterable:true,
      searchFilterable:true,
      type:'select',
      dicUrl: '/contract/contracttype/contractTypeOne',
      props:{
        label:'typeName',
        value:'id'
      },
      rules: [{
        required: true,
        message: "请选择合同类型",
        trigger: "blur"
      }],
      minWidth:100
    },
    {
      label: '采购编号',
      prop: 'purchaseNo',
      search:true,
      minWidth:150,
    },
	  {
      label: '是否招标',
      prop: 'isBidding',
      labelWidth:135,
      type:'radio',
      dicUrl:'/admin/dict/item/type/yes_no',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        message: "请选择是否招标",
        trigger: "blur"
      }],
      minWidth:50,
    },
	  {
      label: '是否需要法律顾问',
      prop: 'isLegalAdviser',
      labelWidth:135,
      type:'radio',
      dicUrl:'/admin/dict/item/type/yes_no',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        message: "请选择是否需要法律顾问",
        trigger: "blur"
      }],
      minWidth:50
    },
	  {
      label: '是否涉及多个部门',
      prop: 'isDepts',
      labelWidth:135,
      type:'radio',
      dicUrl:'/admin/dict/item/type/yes_no',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        message: "请选择是否涉及多个部门",
        trigger: "blur"
      }],
      minWidth:50
    },
    {
      label: '法律顾问意见',
      prop: 'legalAdviserOpinion',
      labelWidth:124,
      // formslot: true,
      hide:true,
    },
    {
      label: '是否经济类合同',
      prop: 'isEconomy',
      labelWidth:135,
      type:'radio',
      dicUrl:'/admin/dict/item/type/yes_no',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        message: "请选择是否经济类合同",
        trigger: "blur"
      }],
      minWidth:50
    },
    {
      label: '是否按实/按月结算',
      prop: 'isActPay',
      labelWidth:135,
      type:'radio',
      dicUrl:'/admin/dict/item/type/yes_no',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        message: "请选择是否按实/按月结算",
        trigger: "blur"
      }],
      minWidth:50
    },
    {
      label: '是否全校合同',
      prop: 'isSchool',
      labelWidth:135,
      type:'radio',
      dicUrl:'/admin/dict/item/type/yes_no',
      props:{
        label:'label',
        value:'value'
      },
      search:true,
      rules: [{
        required: true,
        message: "请选择是否全校合同",
        trigger: "blur"
      }],
      minWidth:50
    },
    {
      label: '是否不定金额合同',
      prop: 'isNotFixMoney',
      labelWidth:135,
      type:'radio',
      dicUrl:'/admin/dict/item/type/yes_no',
      props:{
        label:'label',
        value:'value'
      },
      search:true,
      rules: [{
        required: true,
        message: "请选择是否为不定金额合同",
        trigger: "blur"
      }],
      minWidth:50
    },
	  {
      label: '质保期',
      prop: 'warrantyPeriod',
      labelWidth:124,
      type:'select',
      dicUrl:'/admin/dict/item/type/warranty_period',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        message: "请选择质保期",
        trigger: "blur"
      }],
      minWidth:50
    },
	  {
      label: '合同开始时间',
      prop: 'startTime',
      labelWidth:124,
      type:'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      rules: [{
        required: true,
        message: "请选择开始时间",
        trigger: "blur"
      }],
      minWidth:95
    },
	  {
      label: '合同结束时间',
      prop: 'endTime',
      type:'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      labelWidth:124,
      rules: [{
        required: true,
        message: "请选择结束时间",
        trigger: "blur"
      }],
      minWidth:95
    },
	  {
      label: '支出金额',
      prop: 'money',
      labelWidth:124,
      type:'number',
      precision:2,
      minRows:0,
      minWidth:80
    },
	  {
      label: '收入金额',
      prop: 'inMoney',
      labelWidth:124,
      type:'number',
      precision:2,
      minRows:0,
      minWidth:80
    },
	  {
      label: '对方单位',
      prop: 'supplierNameList',
      labelWidth:124,
      // search:true,
      // searchFilterable:true,
      formslot:true,
      hide:true,
      rules: [{
        required: true,
        message: "请选择供应商",
        trigger: "blur"
      }],
    },
    {
      label:'对方单位',
      prop:'supplierNames',
      slot:true,
      addDisplay:false,
      editDisplay:false,
      minWidth:250,
    },
    {
      label:'对方单位',
      prop:'supplierName',
      addDisplay:false,
      editDisplay:false,
      hide:true,
      search:true,
      searchFilterable:true,
      type:'select',
      dicUrl: '/contract/supplierinfo/getSupplierData',
      props:{
        label:'supplierName',
        value:'supplierName'
      },
    },
    {
      label:'文件数',
      prop:'attachmentNum',
      search:true,
      slot:true,
      addDisplay:false,
      editDisplay:false,
      type:'select',
      dicUrl: '/admin/dict/item/type/attachment_num',
      props:{
        value:'value',
        label:'label'
      },
      minWidth:50
    },
    {
      label:'状态',
      prop:'contractStatus',
      search:true,
      addDisplay:false,
      editDisplay:false,
      type:'select',
      dicUrl: '/admin/dict/item/type/contract_status',
      props:{
        value:'value',
        label:'label'
      },
    },
    {
      label:'审核意见',
      prop:'auditOpinion',
      addDisplay:false,
      editDisplay:false,
      minWidth: 100,
    },
    {
      label: '付款分次',
      prop: 'paymentType',
      labelWidth:124,
      hide:true,
      formslot:true,
      rules: [{
        required: true,
        message: "请选择付款分次",
        trigger: "blur"
      }]
    },
    {
      label: '付款信息',
      prop: 'paymentList',
      labelWidth:124,
      span:24,
      hide:true,
      formslot:true,
    },
    {
      label:'合同进度',
      prop:'plan',
      type:"number",
      slot:true,
      addDisplay:false,
      editDisplay:false
    },
    {
      label:'合同级别',
      prop:'contractLevel',
      addDisplay:false,
      editDisplay:false,
      hide:true,
      search:true,
      type:'select',
      dicUrl: '/admin/dict/item/type/contract_level',
      props:{
        value:'value',
        label:'label'
      },
    }

  ]
}
