/*
 *    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.
 *
 */

import {CURRENT_SCHOOL_TERM, CURRENT_SCHOOL_YEAR} from "@/config/global";
import global from "@/components/tools/commondict";

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  dialogHeight:"100%",
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  column: [
    {
      label: '批次名称',
      prop: 'title',
      width:250,
      span:24,
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请输入批次名称"
      }]
    },
    {
      label: '学年',
      prop: 'schoolYear',
      search:true,
      type:'select',
      dicUrl:'/basic/basicyear/queryAllSchoolYear',
      props:{
        label:'year',
        value:'year'
      },
    },
    {
      label: '学期',
      prop: 'schoolTerm',
      type:'select',
      search:true,
      dicData:global.LEARN_TERM,
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message:"选择学期"
      }]
    },
    {
      label: '季度',
      prop: 'type',
      type:'select',
      editDisabled:true,
      dicUrl: '/admin/dict/item/type/stipend_term_batch_type',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择类别"
      }]
    },
    {
      label: '类别',
      prop: 'classify',
      type:'select',
      editDisabled:true,
      dicUrl: '/admin/dict/item/type/classify',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择类别"
      }]
    },
    {
      label: '补助金额',
      prop: 'moneyValue',
      addDisplay:false,
      editDisplay:false,
    },
    {
      label: '补助金额',
      prop: 'money',
      type:'select',
      hide:true,
      editDisabled:true,
      span:24,
      dicUrl: '/admin/dict/item/type/stipendMoney',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        message: "请填写补助金额",
        trigger: "blur"
      }]
    },
    {
      label: '开始日期',
      prop: 'startTime',
      type:'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      rules: [{
        required: true,
        trigger: 'blur',
        message:"选择开始时间"
      }]
    },
    {
      label: '截止日期',
      prop: 'endTime',
      type:'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd ',
      rules: [{
        required: true,
        trigger: 'blur',
        message:"选择结束时间"
      }]
    },
    {
      label: '备注',
      span:24,
      prop: 'remarks',
      type:'textarea'
    },
  ]
}
