/*
 *    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: 'projectName',
      labelWidth:120,
      type:'tree',
      editDisabled: true,
      span: 24,
      dicUrl: '/finance/financetemporarycatetwo/tree',
      props: {
        label: 'title',
        value: 'id'
      },
      rules: [{          //自定义规则
        required: true,
        trigger: 'blur',
        message:"请选择项目"
      }],
      search:true
    },
    {
      label: '缴费人',
      prop: 'payPeople',
      labelWidth:120,
      filterable:true,
      rules: [
        { max: 20, message: '长度最多 20 个字符', trigger: 'blur' },
        // { validator: rule.validatorNameCn, trigger: 'blur'}
      ]
    },
    {
      label: '缴费时间',
      prop: 'payTime',
      labelWidth:120,

      type:'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd HH:mm:ss',

    },
    {
      label: '部门',
      prop: 'deptCode',
      type:'select',
      search:true,
      labelWidth:120,
      filterable:true,
      searchFilterable:true,
      editDisplay: false,
      addDisplay: false,
      dicUrl: '/basic/basicdept/getDeptListByLevelTwo',
      props: {
        label: 'deptName',
        value: 'deptCode'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请填写部门"
      }],
    },
    {
      label: '使用部门',
      prop: 'deptCodeVal',
      type:'select',
      editDisabled: true,
      labelWidth:120,
      hide:true,
      props: {
        label: 'deptName',
        value: 'deptCode'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message: "请选择使用部门"
      }],
      formslot: true
    },
    {
      label: '使用人',
      prop: 'userPeopleVal',
      labelWidth:120,
      type: 'select',
      hide:true,
      filterable:true,
      editDisabled: true,
      formslot: true,
      rules: [{
        required: true,
        trigger: 'blur',
        message: "请选择使用人"
      }],
    },
    {
      label: '使用人',
      prop: 'userPeople',
      search:true,
      searchFilterable:true,
      type: 'select',
      filterable:true,
      editDisplay: false,
      addDisplay: false,
      dicUrl: '/finance/financetemporarycatebudget/listUserPeople',
      props: {
        label: 'remark',
        value: 'userPeople',
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message: "请选择使用人"
      }],
    },
    {
      label: '创建时间',
      prop: 'createTime',
      addDisplay: false,
      editDisplay: false
    },

	  {
      label: '总金额(元)',
      prop: 'allMoney',
      type:'number',
      labelWidth:120,
      precision:2,
      editDisabled: true,
      span: 24,
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请填写金额"
      }],
    },
    {
      label: '已用金额(元)',
      prop: 'hasMoney',
      type:'number',
      precision:2,
      labelWidth:120,
      editDisplay: false,
      addDisplay: false,
      span: 24,
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请填写金额"
      }],
    },
    {
      label: '结余金额(元)',
      prop: 'leftMoney',
      type:'number',
      precision:2,
      labelWidth:120,
      editDisplay: false,
      addDisplay: false,
      slot:true

    },
    {
      label: '是否启用',
      prop: 'isEnable',
      type:'select',
      span:24,
      search:true,
      labelWidth:120,
      defaultValue:'1',
      dicUrl:'/admin/dict/item/type/yes_no',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择是否启用"
      }],
    },
    {
      label: '是否滚存',
      prop: 'isGc',
      type:'select',
      search:true,
      labelWidth:120,

      span:24,
      addDisplay: false,
      editDisplay: false,
      defaultValue:'0',
      dicUrl:'/admin/dict/item/type/yes_no',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        trigger: 'blur',
        message:"请选择是否滚存"
      }],
    },
    {
      label: '停用备注',
      prop: 'enableRemark',
      span:24,
      labelWidth:120,

      type:'textarea',
      row:true,
    },
	  {
      label: '备注',
      prop: 'remark',
      labelWidth:120,

      span: 24,
      type:'textarea',
      row:true,
    },


  ],
}
