/*
 *    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: 'settingId',
      type:'select',
      search:true,
      addDisplay:true,
      editDisabled:true,
      editDisplay:true,
      dicUrl: '/finance/financetemporarychargessetting/list',
      props:{
        label:'settingName',
        value:'id'
      },rules: [{
        required: true,
        message: '收费项目不能为空',
        trigger: 'blur'
      }]
    },
    {
      label: '学院',
      prop: 'deptCode',
      search:true,
      searchFilterable:true,
      editDisplay:false,
      addDisplay: false,
      type:'select',
      dicUrl: '/basic/basicdept/getDeptList?secondFlag=1',
      props:{
        label:'deptName',
        value:'deptCode'
      },
    },
    {
      label: '班级',
      prop: 'classCode',
      search:true,
      type:"select",
      editDisabled: true,
      searchFilterable:true,
      dicUrl:'/basic/basicclass/list',
      props:{
        label: 'classNo',
        value: 'classNo',
      },rules: [{
        required: true,
        message: '班级不能为空',
        trigger: 'blur'
      }]
    },
    {
      label: '学号',
      prop: 'stuNo',
      search:true,
      editDisplay:true,
      editDisabled: true,
      addDisplay: false
    },
    {
      label: '姓名',
      prop: 'realName',
      search:true,
      editDisplay:true,
      editDisabled: true,
      addDisplay: false
    },
    {
      label: '电话',
      prop: 'phone',
    },
    {
      label: '学费',
      prop: 'tuitionMoney'
    },
    {
      label: '代办费',
      prop: 'agencyMoney'
    },
    {
      label: '住宿费',
      prop: 'lodgingMoney'
    },
    {
      label: '是否推送',
      prop: 'needTS',
      type:"select",
      dicUrl: '/admin/dict/item/type/isTS',
      props:{
        label:'label',
        value:'value'
      },
      editDisabled:false,
      editDisplay:false,
    },
    {
      label: '创建时间',
      prop: 'createTime',
      editDisplay:false,
      addDisplay: false,
    }
  ]
}

export const tableDetailOption = {
  border: true,
  index: false,
  indexLabel: '序号',
  stripe: true,
  align: 'center',
  menu:false,
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  column: [
    {
      label: '备注',
      labelWidth:120,
      prop: 'remarks',
    },
    {
      label: '班级',
      prop: 'classCode',
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '学号',
      prop: 'stuNo',
      editDisabled:true,
      editDisplay:true,
    },
    {
      label: '姓名',
      prop: 'realName',
      editDisabled:true,
      editDisplay:true
    },
    {
      label: '是否缴费',
      prop: 'payStatus',
      type:"select",
      dicUrl: '/admin/dict/item/type/finance_pay_status',
      props:{
        label:'label',
        value:'value'
      },
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '电话',
      prop: 'phone',
      rules:[
        { validator: function (rule, value, callback) {
            var reg=/^1[3456789]\d{9}$/;
            if(!reg.test(value)){
              callback(new Error('请输入有效的手机号码'));
            }else{
              callback()
            }
          }, trigger: 'blur' }
      ]
    },
    {
      label: '生源',
      prop: 'education',
      type:"select",
      dicUrl: '/admin/dict/item/type/pre_school_education',
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '学籍',
      prop: 'enrollStatus',
      type:"select",
      dicUrl: '/admin/dict/item/type/enroll_status',
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '学费',
      prop: 'xf',
    },
    {
      label: '代办费',
      prop: 'dbf',
    },
    {
      label: '住宿费',
      prop: 'zsf',
    },
    {
      label: '应缴',
      prop: 'payable',
      editDisabled:true,
      editDisplay:true,
    },
    {
      label: '已缴',
      prop: 'handed',
      editDisabled:true,
      editDisplay:true,

    },
    {
      label: '欠费',
      prop: 'arrears',
      editDisabled:true,
      editDisplay:true,
    },
  ]
}
