/*
 *    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 {validateMoneyType, validatenum} from "../../../util/validate";
import global from "@/components/tools/commondict"
import {number} from "echarts/src/export";

var checkMoneyMethod = (rule, value, callback) => {

  if (!validateMoneyType(value)) {
    callback(new Error('请输入正确的金额'));
  } else {
    callback();
  }
};
var checkNumberMethod = (rule, value, callback) => {

  if (!validateMoneyType(value)) {
    callback(new Error('请输入正确的整数'));
  } else {
    callback();
  }
};
export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  saveBtnTitle:"提交",
  refreshBtn:false,
  columnBtn:false,
  searchslot:true,
  dialogClickModal:false,
  // dialogFullscreen:true,
  fit:true,
  dialogWeight:'90%',
  dialogHeight:'90%',
  dic: [],

  labelWidth:80,
  column: [
    {
      label: '主键',
      prop: 'id',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '创建人',
      prop: 'createBy',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '创建时间',
      prop: 'createTime',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '更新人',
      prop: 'updateBy',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '更新时间',
      prop: 'updateTime',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '删除标记',
      prop: 'delFlag',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false,

    },
    {
      label: '租户ID',
      prop: 'tenantId',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '合同',
      prop: 'contractId',
      // search: true,
      hide:true,
      span:24,
      width: 100,
      formslot:true
    },
    {
      label: '项目编号',
      prop: 'projectNo',
      search: true,
      minWidth: 120,
      rules: [{
        required: true,
        message: "请输入项目编号",
        trigger: "blur"
      }],
      fixed:true
    },
    {
      label: '项目名称',
      prop: 'projectName',
      rules: [{
        required: true,
        message: "请填写项目名称",
        trigger: "blur"
      }],
      search:true,
      minWidth: 250,
      fixed:true
    },
    {
      label: '合同编号',
      prop: 'contractNo',
      search: true,
      span:24,
      minWidth: 150,
      display: false
    },
    {
      label: '审批状态',
      prop: 'procInsStatus',
      type:'select',
      search:true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      dicUrl: '/train/project/findProjectStatusList',
      props: {
        label: 'label',
        value: 'value'
      },
      minWidth:150
    },
    {
      label: '申报部门',
      prop: 'deptCode',
      hide:true,

      formslot:true,
      rules: [{
        required: true,
        message: "请选择申报部门",
        trigger: "blur"
      }]
    },
    {
      width:100,
      label: '申报部门',
      prop: 'deptName',
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false,
      // search:true,

    },
    {
      width:100,
      label: '学年',
      prop: 'schoolYear',
      type:'select',
      dicUrl:'/basic/basicyear/queryAllSchoolYear',
      props:{
        label:'year',
        value:'year'
      },
      rules: [{
        required: true,
        message: "请选择学年",
        trigger: "blur"
      }],
      search:true,
    },
    {
      minWidth:80,
      label: '学期',
      prop: 'schoolTerm',
      type:'select',
      dicData:global.LEARN_TERM,
      row:true,
      span:24,
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        message: "请选择学期",
        trigger: "blur"
      }],
      search:true,
    },


    {
      label: '项目类别',
      prop: 'projectType',
      type:'select',
      dicUrl: '/train/projecttype/list',
      filterable:true,
      row:true,
      span:24,
      props: {
        label: 'typeName',
        value: 'id'
      },
      formslot:true,
      search:true,
      hide:true,

    },
    {
      label: '培训单位',
      prop: 'trainCompany',
      rules: [{
        required: true,
        message: "请填写培训单位",
        trigger: "blur"
      }],
      hide:true,

    },
    {
      label: '是否取证',
      prop: 'isCertificate',
      type: 'select',
      dicUrl: '/admin/dict/item/type/yes_no',
      rules: [{
        required: true,
        message: "请选择是否取证",
        trigger: "blur"
      }],
      search:true,
      hide:true,

    },
    {
      label: '职业工种',
      prop: 'occupationList',
      formslot:true,
      slot:true,
      span:24,
      filterable:true,
      hide:true,


    },


    {
      label: '总课时',
      prop: 'trainCourses',
      type: 'number',
      hide:true,
      rules: [{
        required: true,
        message: "请填写总课时",
        trigger: "blur"
      },{ validator: checkNumberMethod, trigger: 'blur' }]
    },
    {
      label: '培训对象',
      prop: 'trainObject',
      type: 'select',
      filterable:true,
      hide:true,
      dicUrl: '/train/object/list',
      props: {
        label: 'objectName',
        value: 'id'
      },
      rules: [{
        required: true,
        message: "请选择培训对象",
        trigger: "blur"
      }],

    },
    {
      label: '开始时间',
      prop: 'startDate',
      type: 'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      span: 8,
      rules: [{
        required: true,
        message: "立项开始时间",
        trigger: "blur"
      }],
      // search: true,
      hide:true,
    },
    {
      label: '结束时间',
      prop: 'endDate',
      type: 'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      span: 8,
      rules: [{
        required: true,
        message: "立项时间",
        trigger: "blur"
      }],
      // search: true,
      hide:true,
    },
    {
      label: '鉴定时间',
      prop: 'identityDate',
      type: 'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      span: 8,
      hide:true
    },

    {
      label: '立项金额',
      prop: 'projectTotalIncomeRelationList',
      span: 8,
      slot:true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false,
    },
    {
      label: '到账金额',
      prop: 'projectMoneyArrivedSum',
      span: 8,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false,
    },
    {
      label: '未到账金额',
      prop: 'projectMoneyDelaySum',
      span: 8,
      addDisplay:false,
      editDisabled:false,
      editDisplay:false,
      viewDisplay:false,
      slot:true
    },
    {
      label: '到账情况',
      prop: 'receiptStatus',
      type: 'select',
      dicUrl: '/admin/dict/item/type/train_arrived_status',
      span: 8,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false,
    },
    {
      label: '项目总收入',
      prop: 'incomeList',
      formslot:true,
      slot:true,
      span:24,
      hide:true,
    },

    // {
    //   label: '代办费',
    //   prop: 'agentList',
    //   slot:true,
    //   formslot:true,
    //   span:24,
    //   hide:true,
    // },

    // {
    //   label: '校内资源使用费申报金额',
    //   labelWidth:200,
    //   prop: 'approvalMoney',
    //
    //   hide:true,
    //   addDisplay:false,
    //   editDisabled:true,
    //   editDisplay:false,
    //   viewDisplay:false,
    //   valueDefault:0,
    // },
    {
      label: '排序',
      prop: 'sort',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false,


    },
    {
      label: '补充说明',
      prop: 'remarks',
      type: 'textarea',
      span: 24,
      hide:true,
    },

    {
      label: '审核人',
      prop: 'auditor',
      formslot:true,
      hide:true,
      rules: [{
        required: true,
        message: "请选择审核人",
        trigger: "blur"
      }],
      viewDisplay:false,

      // addDisplay:true,
      // editDisabled:true,
      // editDisplay:false,
      // viewDisplay:false,

      // type: 'select',
      // dicUrl:'/professional/teacherbase/train/getTrainDeptLeader',
      // props: {
      //   label: 'realName',
      //   value: 'teacherNo'
      // },
      span: 24
    },
    {
      label: '核定金额',
      prop: 'approvalMoneyTrainCheck',
      disable:true,
      span:8,
      hide:true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '代办费核定金额',
      prop: 'agentMoneyTrainCheck',
      disable:true,
      labelWidth:150,
      span:8,
      hide:true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '实际金额',
      prop: 'approvalActuallyMoneyCheck',
      disable:true,
      addDisplay:false,
      span:8,
      hide:true
    },
    {
      label: '鉴定级别',
      prop: 'identifyLevelList',
      type: 'checkbox',
      dicUrl: '/train/projectidentifylevel/list',
      props: {
        label: 'identifyLevelName',
        value: 'id'
      },
      span:24,
      formslot:true,
      border:true,
      hide:true,
      addDisplay:false,
    },
    {
      label: '同步预算',
      prop: 'isAsync',
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false,
      span:24,
      type: 'select',
      dicUrl: '/admin/dict/item/type/yes_no',
      props: {
        label: 'label',
        value: 'value'
      },

    },
    {
      label: '单人次收费标准',
      prop: 'singleCharge',
      addDisplay:false,
      editDisplay:false,
      span:8,
    },
    {
      label: '流程审批',
      prop: 'procHistric',
      formslot:true,
      hide:true,
      addDisplay:false,
      viewDisplay:true,
      span:24
    }

  ]
}


export const tableOccupationListOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dialogClickModal:false,
  columnBtn:false,
  refreshBtn:false,
  cellBtn:true,
  keyId:'id',
  cancelBtn:false,

  menu:false,
  dic: [],
  showSummary: true,
  sumColumnList: [
    {
      name: 'trainPeopleNum',
      type: 'sum'
    },
  ],
  column: [
    {
      label: '主键',
      prop: 'id',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '创建人',
      prop: 'createBy',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '创建时间',
      prop: 'createTime',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '更新人',
      prop: 'updateBy',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '更新时间',
      prop: 'updateTime',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '删除标记',
      prop: 'delFlag',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '租户ID',
      prop: 'tenantId',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '职业(工种)',
      prop: 'occupationId',
      type:'select',
      dicUrl: '/train/occupation/list',
      props: {
        label: 'occupationName',
        value: 'id'
      },
      searchable:true,
      filterable:true,
      cell: true,
    },

    {
      label: '等级',
      prop: 'occupationGradeId',
      type: 'select',
      filterable:true,
      dicUrl: '/train/occupationgrade/list',
      props: {
        label: 'gradeName',
        value: 'id'
      },

      cell: true,
    },
    {
      label: '培训人数',
      prop: 'trainPeopleNum',
      type: 'number',
      cell: true,
    }
  ]
}
export const tableEditIncomeListOption= {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dialogClickModal:false,
  columnBtn:false,
  refreshBtn:false,
  cellBtn:true,
  keyId:'id',
  cancelBtn:false,

  menu:false,
  dic: [],
  showSummary: true,
  sumColumnList: [
    {
      name: 'fee',
      type: 'sum'
    },
  ],
  column: [
    {
      label: '主键',
      prop: 'id',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '创建人',
      prop: 'createBy',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '创建时间',
      prop: 'createTime',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '更新人',
      prop: 'updateBy',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '更新时间',
      prop: 'updateTime',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '删除标记',
      prop: 'delFlag',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '租户ID',
      prop: 'tenantId',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '收入来源',
      prop: 'feeSource',
      type: 'select',
      dicUrl: '/train/feesource/list',
      props: {
        label: 'sourceName',
        value: 'id'
      },
      cell: true,
    },
    {
      label: '收入',
      prop: 'fee',
      slot:true
    }
  ]
}
export const tableIncomeListOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dialogClickModal:false,
  columnBtn:false,
  refreshBtn:false,
  cellBtn:true,
  keyId:'id',
  cancelBtn:false,

  menu:false,
  dic: [],
  showSummary: true,
  sumColumnList: [
    {
      name: 'fee',
      type: 'sum'
    },
  ],
  column: [
    {
      label: '主键',
      prop: 'id',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '创建人',
      prop: 'createBy',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '创建时间',
      prop: 'createTime',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '更新人',
      prop: 'updateBy',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '更新时间',
      prop: 'updateTime',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '删除标记',
      prop: 'delFlag',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '租户ID',
      prop: 'tenantId',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '收入来源',
      prop: 'feeSource',
      type: 'select',
      dicUrl: '/train/feesource/list',
      props: {
        label: 'sourceName',
        value: 'id'
      },
      cell: true,
    },
    {
      label: '收入',
      prop: 'fee',
      cell: true,
    }
  ]
}

export const tableAgentListOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dialogClickModal:false,
  columnBtn:false,
  refreshBtn:false,
  cellBtn:true,
  keyId:'id',
  cancelBtn:false,
  size:"mini",
  menu:false,
  dic: [],
  showSummary: true,
  sumColumnList: [
    {
      name: 'fee',
      type: 'sum'
    },
  ],
  column: [
    {
      label: '主键',
      prop: 'id',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '创建人',
      prop: 'createBy',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '创建时间',
      prop: 'createTime',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '更新人',
      prop: 'updateBy',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '更新时间',
      prop: 'updateTime',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '删除标记',
      prop: 'delFlag',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '租户ID',
      prop: 'tenantId',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '名称',
      prop: 'feeSource',
      cell: true,
    },
    {
      label: '金额',
      prop: 'fee',
      type: 'number',
      cell: true,
    }
  ]
}



export const trainDeptAuditOption = {
  submitBtn: false,
  emptytBtn: false,
  row: true,
  labelWidth:90,
  emptyBtn:false,
  // span: 12,
  column: [

    {
      label: '项目编号',
      prop: 'projectNo',
      search: true,
      disabled:true,
    },

    {
      label: '申报部门',
      prop: 'deptName',
      hide:true,
      disabled:true,

    },

    {
      label: '学年',
      prop: 'schoolYear',
      disabled:true,

    },
    {
      label: '学期',
      prop: 'schoolTerm',
      disabled:true,
    },

    {
      label: '项目名称',
      prop: 'projectName',
      disabled:true,
    },
    {
      label: '项目类别',
      prop: 'projectType',
      type:'select',
      dicUrl: '/train/projecttype/list',
      filterable:true,
      props: {
        label: 'typeName',
        value: 'id'
      },
      disabled:true
    },
    {
      label: '培训单位',
      prop: 'trainCompany',
      disabled:true,

    },
    {
      label: '是否取证',
      prop: 'isCertificate',
      type: 'select',
      dicUrl: '/admin/dict/item/type/yes_no',
      disabled:true,

    },
    {
      label: '职业工种',
      prop: 'occupationList',
      formslot:true,
      span:24,
      filterable:true,
    },


    {
      label: '总课时',
      prop: 'trainCourses',
      type: 'number',
      disabled:true,
    },
    {
      label: '培训对象',
      prop: 'trainObject',
      type: 'select',
      filterable:true,
      dicUrl: '/train/object/list',
      props: {
        label: 'objectName',
        value: 'id'
      },
      disabled:true,
    },
    {
      label: '开始时间',
      prop: 'startDate',
      type: 'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      span: 8,
      disabled:true,
    },
    {
      label: '结束时间',
      prop: 'endDate',
      type: 'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      span: 8,
      disabled:true,
    },
    {
      label: '鉴定时间',
      prop: 'identityDate',
      type: 'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      span: 8,
      disabled:true,
    },
    {
      label: '项目总收入',
      labelWidth:180,
      prop: 'incomeList',
      formslot:true,
      slot:true,
      span:24,
      disabled:true,
    },

    {
      label: '代办费',
      prop: 'agentList',
      slot:true,
      formslot:true,
      span:24,

    },

    // {
    //   label: '校内资源使用费申报金额',
    //   labelWidth:200,
    //   prop: 'approvalMoney',
    //   disabled:true,
    //   addDisplay:false,
    //   editDisabled:true,
    //   editDisplay:false,
    //   viewDisplay:false,
    // },
    // {
    //   label: '核定金额',
    //   prop: 'approvalMoneyTrainCheck',
    // },
    {
      label: '补充说明',
      prop: 'remarks',
      type: 'textarea',
      span:24,
      disabled:true,
    },
    // {
    //   label: '鉴定级别',
    //   prop: 'identifyLevelList',
    //   type: 'checkbox',
    //   dicUrl: '/train/projectidentifylevel/list',
    //   props: {
    //     label: 'identifyLevelName',
    //     value: 'id'
    //   },
    //   span:24,
    //   border:true,
    //
    // },
    {
      label: '审核人',
      prop: 'auditor',
      formslot:true,
      rules: [{
        required: true,
        message: "请选择审核人",
        trigger: "blur"
      }],
      span: 24
    },
    {
      label: '审核备注',
      prop: 'auditRemark',
      type: 'textarea',
      span:24,
    },
    {
      label: '流程审批',
      prop: 'procHistric',
      formslot:true,
      hide:true,
      addDisplay:false,
      viewDisplay:true,
      span:24
    }


  ]
}

export const trainAuditOption = {
  submitBtn: false,
  emptytBtn: false,
  row: true,
  labelWidth:90,
  emptyBtn:false,
  // span: 12,
  column: [

    {
      label: '项目编号',
      prop: 'projectNo',
      search: true,
      disabled:true,
    },

    {
      label: '申报部门',
      prop: 'deptName',
      hide:true,
      disabled:true,

    },

    {
      label: '学年',
      prop: 'schoolYear',
      disabled:true,

    },
    {
      label: '学期',
      prop: 'schoolTerm',
      disabled:true,
    },

    {
      label: '项目名称',
      prop: 'projectName',
      disabled:true,
    },
    {
      label: '项目类别',
      prop: 'projectType',
      type:'select',
      dicUrl: '/train/projecttype/list',
      filterable:true,
      props: {
        label: 'typeName',
        value: 'id'
      },
      disabled:true,
      // formslot:true
    },
    {
      label: '培训单位',
      prop: 'trainCompany',
      disabled:true,

    },
    {
      label: '是否取证',
      prop: 'isCertificate',
      type: 'select',
      dicUrl: '/admin/dict/item/type/yes_no',
      disabled:true,

    },
    {
      label: '职业工种',
      prop: 'occupationList',
      formslot:true,
      span:24,
      filterable:true,
    },


    {
      label: '总课时',
      prop: 'trainCourses',
      type: 'number',
      disabled:true,
    },
    {
      label: '培训对象',
      prop: 'trainObject',
      type: 'select',
      filterable:true,
      dicUrl: '/train/object/list',
      props: {
        label: 'objectName',
        value: 'id'
      },
      disabled:true,
    },
    {
      label: '开始时间',
      prop: 'startDate',
      type: 'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      span: 8,
      disabled:true,
    },
    {
      label: '结束时间',
      prop: 'endDate',
      type: 'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      span: 8,
      disabled:true,
    },
    {
      label: '鉴定时间',
      prop: 'identityDate',
      type: 'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      span: 8,
      disabled:true,
    },
    {
      label: '项目总收入',
      prop: 'incomeList',
      formslot:true,
      slot:true,
      span:24,
      disabled:true,
    },

    {
      label: '代办费',
      prop: 'agentList',
      slot:true,
      formslot:true,
      span:24,

    },

    // {
    //   label: '校内资源使用费申报金额',
    //   labelWidth:200,
    //   prop: 'approvalMoney',
    //   disabled:true,
    //   addDisplay:false,
    //   editDisabled:true,
    //   editDisplay:false,
    //   viewDisplay:false,
    //   span:8
    // },
    // {
    //   label: '核定金额',
    //   prop: 'approvalMoneyTrainCheck',
    //   valueDefault: 0,
    //   hide:true,
    //   addDisplay:false,
    //   editDisabled:true,
    //   editDisplay:false,
    //   viewDisplay:false,
    //   span:8
    // },
    {
      label: '实际金额',
      prop: 'approvalActuallyMoneyCheck',
      valueDefault: 0,
      span:8
    },
    {
      label: '补充说明',
      prop: 'remarks',
      type: 'textarea',
      span:24,
      disabled:true,
    },
    {
      label: '鉴定级别',
      prop: 'identifyLevelList',
      type: 'checkbox',
      dicUrl: '/train/projectidentifylevel/list',
      props: {
        label: 'identifyLevelName',
        value: 'id'
      },
      span:24,
      border:true,

    },
    // {
    //   label: '审核人',
    //   prop: 'auditor',
    //   formslot:true,
    //   rules: [{
    //     required: true,
    //     message: "请选择审核人",
    //     trigger: "blur"
    //   }],
    //   span: 24
    // },
    {
      label: '审核备注',
      prop: 'auditRemark',
      type: 'textarea',
      span:24,
    },
    {
      label: '流程审批',
      prop: 'procHistric',
      formslot:true,
      hide:true,
      addDisplay:false,
      viewDisplay:true,
      span:24
    }

  ]
}

export const starterAuditOption = {
  submitBtn: false,
  emptytBtn: false,
  row: true,
  labelWidth:90,
  emptyBtn:false,
  // span: 12,
  column: [

    {
      label: '项目编号',
      prop: 'projectNo',
      search: true,

    },

    {
      label: '申报部门',
      prop: 'deptCode',
      formslot:true,
      rules: [{
        required: true,
        message: "请选择申报部门",
        trigger: "blur"
      }]
    },

    {
      label: '学年',
      prop: 'schoolYear',
      type:'select',
      dicUrl:'/basic/basicyear/queryAllSchoolYear',
      props:{
        label:'year',
        value:'year'
      },
      rules: [{
        required: true,
        message: "请选择学年",
        trigger: "blur"
      }],


    },
    {
      label: '学期',
      prop: 'schoolTerm',
      type:'select',
      dicData:global.LEARN_TERM,
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        message: "请选择学期",
        trigger: "blur"
      }],
    },

    {
      label: '项目名称',
      prop: 'projectName',

    },
    {
      label: '项目类别',
      prop: 'projectType',
      type:'select',
      dicUrl: '/train/projecttype/list',
      filterable:true,
      props: {
        label: 'typeName',
        value: 'id'
      },

    },
    {
      label: '培训单位',
      prop: 'trainCompany',


    },
    {
      label: '是否取证',
      prop: 'isCertificate',
      type: 'select',
      dicUrl: '/admin/dict/item/type/yes_no',


    },
    {
      label: '职业工种',
      prop: 'occupationList',
      formslot:true,
      span:24,
      filterable:true,
    },


    {
      label: '总课时',
      prop: 'trainCourses',
      type: 'number',

    },
    {
      label: '培训对象',
      prop: 'trainObject',
      type: 'select',
      filterable:true,
      dicUrl: '/train/object/list',
      props: {
        label: 'objectName',
        value: 'id'
      },

    },
    {
      label: '开始时间',
      prop: 'startDate',
      type: 'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      span: 8,

    },
    {
      label: '结束时间',
      prop: 'endDate',
      type: 'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      span: 8,

    },
    {
      label: '鉴定时间',
      prop: 'identityDate',
      type: 'date',
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      span: 8,

    },
    {
      label: '项目总收入',
      prop: 'incomeList',
      formslot:true,
      slot:true,
      span:24,

    },

    {
      label: '代办费',
      prop: 'agentList',
      slot:true,
      formslot:true,
      span:24,

    },

    // {
    //   label: '校内资源使用费申报金额',
    //   labelWidth:200,
    //   prop: 'approvalMoney',
    //   addDisplay:false,
    //   editDisabled:true,
    //   editDisplay:false,
    //   viewDisplay:false,
    //
    // },

    {
      label: '补充说明',
      prop: 'remarks',
      type: 'textarea',
      span:24,
    },

    {
      label: '审核人',
      prop: 'auditor',
      formslot:true,
      rules: [{
        required: true,
        message: "请选择审核人",
        trigger: "blur"
      }],
      span: 24
    },
    {
      label: '流程审批',
      prop: 'procHistric',
      formslot:true,
      hide:true,
      addDisplay:false,
      viewDisplay:true,
      span:24
    }


  ]
}
export const tableFreeSetOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: true,
  delBtn: true,
  addBtn: true,
  dic: [],
  column: [
    {
      label: '主键',
      prop: 'id',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false
    },
    {
      label: '名称',
      prop: 'name',
      span:24,
      rules: [{
        required: true,
        message: "请填写名称",
        trigger: "blur"
      }]
    },
    {
      label: '金额',
      prop: 'money',
      span:24,
      rules: [{
        required: true,
        message: "请填写金额",
        trigger: "blur"
      },{ validator: checkMoneyMethod, trigger: 'blur' }]
    },{
      label: '备注',
      prop: 'remarks',
      type: 'textarea',
      span:24,
    },
    {
      label: '是否必选',
      prop: 'isMandatory',
      dicUrl: '/admin/dict/item/type/yes_no',
      type:'switch',
      props:{
        label:'label',
        value:'value'
      },
      rules: [{
        required: true,
        message: "请选择是否必选",
        trigger: "blur"
      }],
      width:150
    },
  ]
}
