/*
 *    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 YES_OR_NO=[
  {
    label:'待审核',
    value:'0'
  },
  {
    label:'审核通过',
    value:'1'
  },
  {
    label:'审核驳回',
    value:'2'
  }
]
export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  column: [
    {
      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: 'bathId',
      labelWidth: 120,
      search:true,
      type:"select",
      dicUrl: '/stuwork/stipendtermbatch/list',
      props: {
        label: 'title',
        value: 'id'
      },
    },
    {
      label: '学院',
      prop: 'deptCode',
      labelWidth: 120,
      search:true,
      type:"select",
      dicUrl: '/basic/basicdept/getDeptList?secondFlag=1',
      props: {
        label: 'deptName',
        value: 'deptCode'
      },
    },
	  {
      label: '学院名称',
      prop: 'deptName'
    },
	  {
      label: '专业编码',
      prop: 'majorCode'
    },
	  {
      label: '专业名称',
      prop: 'majorName'
    },
	  {
      label: '班主任工号',
      prop: 'teacherNo'
    },
	  {
      label: '班主任姓名',
      prop: 'teacherName'
    },
	  {
      label: '年级',
      prop: 'grade'
    },
	  {
      label: '班号',
      prop: 'classNo'
    },
	  {
      label: '学号',
      prop: 'stuNo'
    },
	  {
      label: '姓名',
      prop: 'realName'
    },
    {
      label: '性别',
      prop: 'gender',
      addDisplay:false,
      editDisplay: false,
      type:"select",
      dicUrl: '/admin/dict/item/type/sexy',
      props:{
        label:'label',
        value:'value'
      },
    },
	  {
      label: '联系电话',
      prop: 'phone'
    },
	  {
      label: '身份证号',
      prop: 'idCard'
    },
	  {
      label: '金额',
      prop: 'money'
    },
    {
      label: '审核状态',
      prop: 'checkStatus',
      search:true,
      type:"select",
      addDisplay:false,
      dicData:YES_OR_NO,
      props:{
        label:'label',
        value:'value'
      },
    },
    {
      label: '文化程度',
      prop: 'education',
      addDisplay:false,
      editDisplay: false,
      type:"select",
      dicUrl: '/admin/dict/item/type/pre_school_education',
      props:{
        label:'label',
        value:'value'
      },
    },
    {
      label: '备注',
      prop: 'remarks'
    },
  ]
}
export const tableStuListOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  selection: true,
  stripe: true,
  menuAlign: 'center',
  menu:false,
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  column: [
    {
      label: '助学金类型',
      prop: 'bathId',
      labelWidth: 120,
      hide:true,
      searchFilterable:true,
      search:true,
      type:"select",
      dicUrl: '/stuwork/stipendtermbatch/list',
      props: {
        label: 'title',
        value: 'id'
      },
    },
    {
      label: '班级',
      prop: 'classCode',
      width: 100,
      searchFilterable:true,
      search:true,
      type:'select',
      dicUrl:'/basic/basicclass/listByRole',
      props:{
        label:'classNo',
        value:'classCode'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message:"选择班级"
      }]
    },
    {
      label: '学号',
      prop: 'stuNo'
    },
    {
      label: '姓名',
      prop: 'realName'
    },
  ]
}
