/*
 *    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 YES_OR_NO=[
  {
    label:'退',
    value:'0'
  },
  {
    label:'补',
    value:'1'
  }

]

export const IS_STAY_DIC=[
  {
    label:'否',
    value:'0'
  },
  {
    label:'是',
    value:'1'
  }

]
export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  menuWidth:120,
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  labelWidth:150,
  dialogHeight:710,
  dialogTop:0,
  column: [
    {
      label: '常规异动名称',
      prop: 'settingId',
      hide:true,
      type:'select',
      span:24,
      search:true,
      editDisabled:true,
      dicUrl:'/finance/financenormalturnovesetting/queryAllList',
      props:{
        label:'settingName',
        value:'id'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择异动名称"
      }]
    },
    {
      label: '班号',
      prop: 'classCode',
      searchFilterable: true,
      hide:false,
      search:true,
      filterable: true,
      editDisplay:true,
      editDisabled:true,
      span:24,
      type: 'select',
      dicUrl: '/basic/basicclass/list',
      props: {
        label: 'classNo',
        value: 'classCode',
      },
      rules: [{
        required: true,
        message: '请填写班级代码',
        trigger: 'blur'
      }]
    },
    {
      label: '学号/姓名',
      width: "40%",
      prop: 'userInfo',
      search:true,
      display:false,
      hide:true,
    },
    {
      label: '学号',
      span:24,
      prop: 'stuNo',
      editDisplay:true,
      formslot:true,
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请输入学号"
      }]
    },
    {
      label: '缴费明细',
      span:24,
      prop: 'payInfo',
      hide: true,
      addDisplay: true,
      editDisplay:true,
      formslot:true,
    },
    {
      label: '姓名',
      width: "50%",
      prop: 'realName',
      editDisabled:true,
      addDisplay:false,
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请输入姓名"
      }]
    },
    {
      label: '银行卡',
      prop: 'bankCode',
      display:false
    },
    {
      label: '生源',
      width: "50%",
      prop: 'education',
      display:false,
      type:'select',
      dicUrl: '/admin/dict/item/type/pre_school_education',
      props:{
        label:'label',
        value:'value'
      },
    },
    {
      label: '学籍',
      width: "50%",
      prop: 'enrollStatus',
      display:false,
      type:"select",
      dicUrl: '/admin/dict/item/type/enroll_status',
    },
    {
      label: '住宿',
      width: "50%",
      prop: 'isStay',
      display:false,
    },
    {
      label: '材料费',
      width: "70%",
      prop: 'materialMoneyLabel',
      display:false,
    },
    {
      label: '材料费',
      prop: 'materialMoney',
      type:'number',
      precision:2,
      span:24,
      hide:true
    },
    {
      label: '代办费',
      width: "70%",
      prop: 'agencyFeeLabel',
      span:24,
      display:false,
    },
    {
      label: '代办费',
      prop: 'agencyFee',
      type:'number',
      precision:2,
      span:24,
      hide:true
    },
    {
      label: '学校代办费材料费',
      prop: 'agencyMaterialFee',
      type:'number',
      precision:2,
      span:24,
      hide:true
    },
    {
      label: '学费',
      width: "60%",
      prop: 'learnFeeLabel',
      display:false,
      span:24,
    },
    {
      label: '学费',
      prop: 'learnFee',
      type:'number',
      precision:2,
      span:24,
      hide:true
    },
    {
      label: '住宿费',
      prop: 'stayMoneyLabel',
      span:24,
      display:false,
    },
    {
      label: '住宿费',
      prop: 'stayMoney',
      type:'number',
      precision:2,
      span:24,
      hide:true
    },
    {
      label: '退补类型',
      prop: 'type',
      slot:true,
      type:'radio',
      search:true,
      dicData:YES_OR_NO,
      props:{
        label:'label',
        value:'value'
      },
      span:24,
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择类型"
      }]
    },
    {
      label: '是否操作',
      hide:true,
      prop: 'isOpt',
      display:false,
      slot:true,
      type:'radio',
      dicData:YES_OR_NO,
      props:{
        label:'label',
        value:'value'
      },
      span:24,
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择类型"
      }]
    },
    {
      label: '应退/补',
      prop: 'shouldPay',
      display:false,
    },
    {
      label: '已退/补',
      prop: 'realPay',
      display:false,

    },
    {
      label: '欠退/补',
      prop: 'oweFee',
      display:false,
    },
    {
      label: '是否推送成功',
      width: '60%',//表格宽度
      prop: 'isTS',
      display:false,
    },
    // {
    //   label: '付款码',
    //   prop: 'payCode',
    // },
    {
      label: '备注',
      prop: 'remarks',
      type:'textarea',
      span:24,
    },
  ]
}

//财务
export const tableOptionForFinance = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  labelWidth:150,
  dialogHeight:700,
  dialogTop:0,
  column: [
    // {
    //   label: '主键',
    //   prop: 'id'
    // },
    // {
    //   label: '创建人',
    //   prop: 'createBy'
    // },
    // {
    //   label: '创建时间',
    //   prop: 'createTime'
    // },
    // {
    //   label: '更新人',
    //   prop: 'updateBy'
    // },
    // {
    //   label: '更新时间',
    //   prop: 'updateTime'
    // },
    // {
    //   label: '删除标记',
    //   prop: 'delFlag'
    // },
    // {
    //   label: '备注',
    //   prop: 'remarks'
    // },
    {
      label: '常规异动名称',
      prop: 'settingId',
      hide:true,
      search:true,
      type:'select',
      span:24,

      dicUrl:'/finance/financenormalturnovesetting/queryAllList',
      props:{
        label:'settingName',
        value:'id'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择异动名称"
      }],
      disabled:true,


    },
    {
      label: '班号',
      prop: 'classCode',
      search:true,
      searchFilterable:true,
      type:"select",
      dicUrl:'/basic/basicclass/list',
      props:{
        label: 'classNo',
        value: 'classCode',
      },
    },
    {
      label: '学号/姓名',
      prop: 'userInfo',
      search:true,
      display:false,
      hide:true,
    },
    {
      label: '学号',
      prop: 'stuNo',
      display:false,
      formslot:true,
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请输入学号"
      }]
    },
    {
      label: '姓名',
      prop: 'realName',
      editDisabled:true,
      addDisplay:false,
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请输入姓名"
      }]
    },
    {
      label: '银行卡号',
      prop: 'bankCode',
      display:false,
    },
    {
      label: '生源',
      prop: 'education',
      display:false,
      type:"select",
      dicUrl: '/admin/dict/item/type/pre_school_education',
      props:{
        label:'label',
        value:'value'
      },
    },
    {
      label: '学籍状态',
      prop: 'enrollStatus',
      display:false,
      type:"select",
      dicUrl: '/admin/dict/item/type/enroll_status',
    },
    {
      label: '是否住宿',
      prop: 'isStay',
      display:false
    },
    {
      label: '材料费',
      prop: 'materialMoneyLabel',
      display:false,
    },
    {
      label: '材料费',
      prop: 'materialMoney',
      type:'number',
      precision:2,
      span:24,
      hide:true,
      disabled:true,
    },
    {
      label: '代办费',
      prop: 'agencyFeeLabel',
      span:24,
      display:false,
    },
    {
      label: '代办费',
      prop: 'agencyFee',
      type:'number',
      precision:2,
      span:24,
      hide:true,
      disabled:true,

    },
    {
      label: '学费',
      prop: 'learnFeeLabel',
      display:false,
      span:24,
    },
    {
      label: '学费',
      prop: 'learnFee',
      type:'number',
      precision:2,
      span:24,
      hide:true,
      disabled:true,

    },
    {
      label: '住宿费',
      prop: 'stayMoneyLabel',
      span:24,
      display:false,
    },
    {
      label: '住宿费',
      prop: 'stayMoney',
      type:'number',
      precision:2,
      span:24,
      hide:true,
      disabled:true,

    },
    {
      label: '退补类型',
      prop: 'type',
      type:'select',
      dicData:YES_OR_NO,
      props:{
        label:'label',
        value:'value'
      },
      disabled:true,
      span:24,
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择类型"
      }]
    },
    {
      label: '应退/补',
      prop: 'shouldPay',
      display:false,


    },
    {
      label: '已退/补',
      prop: 'realPay',
      display:false,

    },
    {
      label: '欠退/补',
      prop: 'oweFee',
      display:false,
    },

    // {
    //   label: '付款码',
    //   prop: 'payCode',
    // },

    {
      label: '缴费方式',
      prop: 'payType',
      dicUrl:'/admin/dict/item/type/finance_pay_way',
      props:{
        label:'label',
        value:'value'
      },
      type:'select',
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择缴费方式"
      }]
    },
    {
      label: '操作人',
      prop: 'operater',
      slot:true,
      span:24,
      display:false
    },
  ]
}

const  PAY_STATUS=[
  {label:'未缴费',value:'0'},
  {label:'已缴费',value:'10'},
  {label:'未退费',value:'11'},
  {label:'已退费',value:'12'},
]

export const tableHistoryOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  page:false,
  showSummary:true,
  menu:false,
  sumColumnList: [
    {
      name: 'money',
      type: 'sum'
    },
    {
      name: 'paiedMoney',
      type: 'sum'
    }],
  column: [
    {
      label: '主键',
      prop: 'id',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
    {
      label: '缴费时间',
      prop: 'payTime'
    },
    {
      label: '学号',
      prop: 'stuNo',
    },
    {
      label: '姓名',
      prop: 'realName',
    },
    {
      label: '项目名称',
      prop: 'settingName'
    },
    {
      label: '费用名称',
      prop: 'projectName'
    },
    {
      label: '缴/退类型',
      prop: 'typeValue'
    },
    {
      label: '应缴/应退金额',
      width: '120px',
      prop: 'money'
    },
    {
      label: '实缴/实退金额',
      width: '120px',
      prop: 'paiedMoney'
    },
    {
      label: '缴费状态',
      prop: 'status',
      type:"select",
      dicData:PAY_STATUS,
      props:{
        label:'label',
        value:'value'
      },
    },
    {
      label: '备注',
      prop: 'remark'
    },
  ]
}
