/*
 *    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 fa from "element-ui/src/locale/lang/fa";

export const tableOption = {
  border: true,
  index: false,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  menuWidth:120,
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  column: [
    {
      label: '收费项目',
      prop: 'normalId',
      type:'select',
      hide:true,
      search:true,
      addDisplay:true,
      editDisabled:true,
      editDisplay:false,
      dicUrl: '/finance/financenormalsetting/list',
      props:{
        label:'settingName',
        value:'id'
      }
    },
    {
      label: '学院',
      prop: 'deptCode',
      width: '60%',//表格宽度
      search:true,
      searchFilterable:true,
      editDisabled:true,
      editDisplay:false,
      type:'select',
      dicUrl: '/basic/basicdept/getDeptList?secondFlag=1',
      props:{
        label:'deptName',
        value:'deptCode'
      },
    },
    {
      label: '专业',
      prop: 'majorCode',
      hide:true,
      // search:true,
      searchFilterable:true,
      editDisabled:true,
      editDisplay:false,
      type:'select',
      dicUrl: '/basic/major/getMajorNameList',
      props: {
        label: 'majorName',
        value: 'majorCode'
      }
    },
    {
      label: '班号',
      width: '50%',//表格宽度
      prop: 'classCode',
      search:true,
      searchFilterable:true,
      editDisabled:true,
      editDisplay:false,
      type:"select",
      dicUrl:'/basic/basicclass/list',
      props:{
        label: 'classNo',
        value: 'classNo',
      },
    },
    // {
    //   label: '班级',
    //   width: '50%',//表格宽度
    //   prop: 'classCode',
    //   search:true,
    //   editDisabled:true,
    //   editDisplay:false,
    // },
    {
      label: '学号',
      width: '50%',//表格宽度
      prop: 'stuNo',
      search:true,
      editDisabled:true,
      editDisplay:true,
    },
    {
      label: '姓名',
      prop: 'realName',
      width: '50%',//表格宽度
      search:true,
      editDisabled:true,
      editDisplay:true
    },
    {
      label: '是否缴费',
      width: '50%',//表格宽度
      prop: 'payStatus',
      search:true,
      type:"select",
      dicUrl: '/admin/dict/item/type/finance_pay_status',
      props:{
        label:'label',
        value:'value'
      },
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '电话',
      prop: 'phone',
      width: '60%',//表格宽度
      rules:[
        { validator: function (rule, value, callback) {
            var reg=/^1[3456789]\d{9}$/;
            if(!reg.test(value)){
              callback(new Error('请输入有效的手机号码'));
            }else{
              callback()
            }
          }, trigger: 'blur' }
      ]
    },
    // {
    //   label: '银行卡号',
    //   width: '60%',//表格宽度
    //   prop: 'bankCode',
    //   editDisabled:true,
    //   editDisplay:false,
    // },
    {
      label: '生源',
      prop: 'education',
      width: '50%',//表格宽度
      search:true,
      type:"select",
      dicUrl: '/admin/dict/item/type/pre_school_education',
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '学籍',
      prop: 'enrollStatus',
      width: '50%',//表格宽度
      search:true,
      type:"select",
      dicUrl: '/admin/dict/item/type/enroll_status',
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '在校状态',
      width: '60%',//表格宽度
      prop: 'stuStatus',
      search:true,
      type:"select",
      dicUrl: '/admin/dict/item/type/student_status',
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '住宿',
      width: '60%',//表格宽度
      prop: 'isStay',
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '材料费',
      width: '50%',//表格宽度
      prop: 'clf',
      type:'number',
      precision:2
    },
    {
      label: '代办费',
      width: '50%',//表格宽度
      prop: 'dbf',
      type:'number',
      precision:2
    },
    {
      label: '学校代办费材料费',
      width: '50%',//表格宽度
      prop: 'agencyMaterialFee',
      type:'number',
      precision:2
    },
    {
      label: '中德班',
      width: '50%',//表格宽度
      prop: 'zdxf',
      type:'number',
      precision:2
    },
    {
      label: '学费',
      prop: 'xf',
      type:'number',
      precision:2,
      slot:true,
      editDisabled:false,
      editDisplay:true,
    },
    {
      label: '住宿费',
      width: '60%',//表格宽度
      prop: 'zsf',
      type:'number',
      precision:2
    },
    {
      label: '应缴',
      width: '50%',//表格宽度
      prop: 'payable',
      editDisabled:true,
      editDisplay:true,
    },
    {
      label: '已缴',
      width: '50%',//表格宽度
      prop: 'handed',
      editDisabled:true,
      editDisplay:true,

    },
    {
      label: '欠费',
      width: '50%',//表格宽度
      prop: 'arrears',
      editDisabled:true,
      editDisplay:true,
    },
    {
      label: '提交状态',
      width: '60%',//表格宽度
      prop: 'isSubmit',
      search:true,
      type:"select",
      dicUrl: '/admin/dict/item/type/normal_state',
      props:{
        label:'label',
        value:'value'
      },
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '备注',
      labelWidth:120,
      prop: 'remarks',
      slot:true
    },
    {
      label: '是否推送成功',
      width: '60%',//表格宽度
      prop: 'isTS',
      editDisabled:true,
      editDisplay:true
    },
    {
      label: '是否推送',
      width: '60%',//表格宽度
      prop: 'grade',
      search:true,
      hide: true,
      type:"select",
      dicUrl: '/admin/dict/item/type/isTS',
      props:{
        label:'label',
        value:'value'
      },
      editDisabled:true,
      editDisplay:false,
    },
  ]
}


export const tableOtherOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  column: [
    {
      label: '收费项目',
      prop: 'projectCode',
    },
    {
      label: '费用',
      prop: 'money'
    }
    ,
    {
      label: '状态',
      prop: 'status',
      type:"select",
      dicUrl: '/admin/dict/item/type/finance_pay_status',
      props:{
        label:'label',
        value:'value'
      },
    },
    {
      label: '缴费方式',
      prop: 'payType',
      type:"select",
      dicUrl: '/admin/dict/item/type/finance_pay_way',
      props:{
        label:'label',
        value:'value'
      },
    },
    {
      label: '缴费时间',
      prop: 'payTime'
    },
    {
      label: '已支付费用',
      prop: 'paiedMoney'
    },
    {
      label: '备注',
      prop: 'remarks'
    }
  ]
}


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: '班级',
      width: '50%',//表格宽度
      prop: 'classCode',
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '学号',
      width: '50%',//表格宽度
      prop: 'stuNo',
      editDisabled:true,
      editDisplay:true,
    },
    {
      label: '姓名',
      prop: 'realName',
      width: '50%',//表格宽度
      editDisabled:true,
      editDisplay:true
    },
    {
      label: '是否缴费',
      width: '50%',//表格宽度
      prop: 'payStatus',
      type:"select",
      dicUrl: '/admin/dict/item/type/finance_pay_status',
      props:{
        label:'label',
        value:'value'
      },
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '电话',
      prop: 'phone',
      width: '60%',//表格宽度
      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',
      width: '50%',//表格宽度
      type:"select",
      dicUrl: '/admin/dict/item/type/pre_school_education',
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '学籍',
      prop: 'enrollStatus',
      width: '50%',//表格宽度
      type:"select",
      dicUrl: '/admin/dict/item/type/enroll_status',
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '在校状态',
      width: '60%',//表格宽度
      prop: 'stuStatus',
      type:"select",
      dicUrl: '/admin/dict/item/type/student_status',
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '住宿',
      width: '60%',//表格宽度
      prop: 'isStay',
      editDisabled:true,
      editDisplay:false,
    },
    {
      label: '材料费',
      width: '50%',//表格宽度
      prop: 'clf',
    },
    {
      label: '代办费',
      width: '50%',//表格宽度
      prop: 'dbf',
    },
    {
      label: '学校代办费材料费',
      width: '50%',//表格宽度
      prop: 'agencyMaterialFee',
    },
    {
      label: '中德班',
      width: '50%',//表格宽度
      prop: 'zdxf',
    },
    {
      label: '学费',
      prop: 'xf',
      editDisabled:false,
      editDisplay:true,
    },
    {
      label: '住宿费',
      width: '60%',//表格宽度
      prop: 'zsf',
    },
    {
      label: '应缴',
      width: '50%',//表格宽度
      prop: 'payable',
      editDisabled:true,
      editDisplay:true,
    },
    {
      label: '已缴',
      width: '50%',//表格宽度
      prop: 'handed',
      editDisabled:true,
      editDisplay:true,

    },
    {
      label: '欠费',
      width: '50%',//表格宽度
      prop: 'arrears',
      editDisabled:true,
      editDisplay:true,
    },
  ]
}
