/*
 *    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 {ROLE_CODE} from "../../../config/global";

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  selection: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  saveBtnTitle: "提交",
  dic: [],
  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: '',
      prop: 'sort',
      hide: true,
      addDisplay: false,
      editDisabled: true,
      editDisplay: false,
      viewDisplay: false
    },
    {
      label: '申报部门',
      prop: 'deptCode',
      formslot:true,
      hide: true,
      addDisplay: false,
      editDisabled: true,
      editDisplay: false,
      viewDisplay:false,
      rules: [{
        required: true,
        message: "请选择申报部门",
        trigger: "blur"
      }]
    },
    {
      width:100,
      label: '申报部门',
      prop: 'deptName',
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      viewDisplay:false,
    },
    {
      label: '项目编号',
      prop: 'projectNo',
      search: true,
      span: 24,
      formslot: true,
      rules: [{
        required: true,
        message: "请输入项目编号",
        trigger: "blur"
      }]
    },
    {
      label: '项目名称',
      prop: 'projectName',
      hide: true,
      formslot: true,
    },
    {
      label: '立项金额',
      prop: 'totalIncome',
      // type: 'number',
      formslot: true,
      // viewDisplay:false
    },

    {
      label: '到账公司',
      prop: 'companyName',
      rules: [{
        required: true,
        message: "请输入到账公司",
        trigger: "blur"
      }]
    },
    {
      label: '到账时间',
      prop: 'arrivedTime',
      type: 'date',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      rules: [{
        required: true,
        message: "请输入到账时间",
        trigger: "blur"
      }]
    },
    {
      label: '到账金额',
      prop: 'arrivedMoney',
      // type: 'number',
      formslot: true,
      rules: [{
        required: true,
        message: "请输入到账金额",
        trigger: "blur"
      }]
    },
    {
      label: '到账情况',
      prop: 'arrivedStatus',
      dicUrl: '/admin/dict/item/type/train_arrived_status',
      type: 'select',
      search: true,
      props: {
        label: 'label',
        value: 'value'
      },
      rules: [{
        required: true,
        message: "请选择到账情况",
        trigger: "blur"
      }]
    },
    {
      label: '审核状态',
      prop: 'procInsStatus',
      dicUrl: '/train/projectmoneyarrived/procInsStatus',
      type: 'select',
      search: true,
      props: {
        label: 'label',
        value: 'value'
      },
      addDisplay: false,
      editDisabled: true,
      editDisplay: false,
      viewDisplay: false
    },
    {
      label: '审批人',
      prop: 'auditor',
      dicUrl: '/admin/user/info/roleuser/' + ROLE_CODE.ROLE_TRAIN_MONEY_ARRIVED,
      type: 'radio',
      props: {
        label: 'realName',
        value: 'username'
      },
      rules: [{
        required: true,
        message: "请选择到账审核人",
        trigger: "blur"
      }],
      hide: true,
      addDisabled: true,
      addDisplay: false,
      editDisabled: true,
      editDisplay: false,
      viewDisplay: false
    },
    {
      label: '备注',
      type: "textarea",
      span: 24,
      prop: 'remarks',
      formslot: true,
    },
    {
      label: '流程审批',
      prop: 'procHistric',
      formslot: true,
      hide: true,
      addDisplay: false,
      viewDisplay: true,
      span: 24
    },
    {
      label: '附件',
      prop: 'attachment',
      slot: true,
      formslot: true,
    },
    {
      label: '同步到用友',
      prop: 'isAsyncYy',
      editDisabled: false,
      editDisplay: false,
      addDisabled: false,
      addDisplay: false,
      type: 'select',
      search: true,
      dicUrl: '/admin/dict/item/type/yes_no',
      props: {
        label: 'label',
        value: 'value'
      },
    },
  ]
}

export const trainAuditTaskOption = {
  submitBtn: false,
  emptytBtn: false,
  row: true,
  labelWidth: 90,
  emptyBtn: false,
  // span: 12,
  column: [
    {
      label: '项目编号',
      prop: 'projectNo',
      disabled: true,
      span: 24,
      formslot: true,
    },
    {
      label: '项目名称',
      prop: 'projectName',
      hide: true,
      disabled: true,
      formslot: true,
    },
    {
      label: '立项金额',
      prop: 'totalIncome',
      disabled: true,
      // type: 'number',
      formslot: true,
      // viewDisplay:false
    },

    {
      label: '到账公司',
      prop: 'companyName',
      disabled: true,
    },
    {
      label: '到账时间',
      prop: 'arrivedTime',
      type: 'date',
      format: 'yyyy-MM-dd',
      disabled: true,
    },
    {
      label: '到账金额',
      prop: 'arrivedMoney',
      // type: 'number',
      disabled: true,
    },
    {
      label: '到账情况',
      prop: 'arrivedStatus',
      dicUrl: '/admin/dict/item/type/train_arrived_status',
      type: 'select',
      props: {
        label: 'label',
        value: 'value'
      },
      rules: [{
        required: true,
        message: "请选择到账情况",
        trigger: "blur"
      }]
      // disabled:true,
    },
    {
      label: '附件',
      prop: 'attachment',
      slot: true,
      formslot: true
    },
    {
      label: '备注',
      type: "textarea",
      span: 24,
      prop: 'remarks',
      disabled: true,
    },
    {
      label: '审核备注',
      prop: 'auditRemark',
      type: 'textarea',
      span: 24,
    },

  ]
}
export const financeAuditTaskOption = {
  submitBtn: false,
  emptytBtn: false,
  row: true,
  labelWidth: 90,
  emptyBtn: false,
  // span: 12,
  column: [
    {
      label: '项目编号',
      prop: 'projectNo',
      disabled: true,
      span: 24,
      formslot: true,
    },
    {
      label: '项目名称',
      prop: 'projectName',
      hide: true,
      disabled: true,
      formslot: true,
    },
    {
      label: '立项金额',
      prop: 'totalIncome',
      disabled: true,
      // type: 'number',
      formslot: true,
      // viewDisplay:false
    },

    {
      label: '到账公司',
      prop: 'companyName',

    },
    {
      label: '到账时间',
      prop: 'arrivedTime',
      type: 'date',
      format: 'yyyy-MM-dd',
      valueFormat: "yyyy-MM-dd",
      disabled: false,
    },
    {
      label: '到账金额',
      prop: 'arrivedMoney',

      disabled: false,
    },

    {
      label: '到账情况',
      prop: 'arrivedStatus',
      dicUrl: '/admin/dict/item/type/train_arrived_status',
      type: 'select',
      props: {
        label: 'label',
        value: 'value'
      },
      rules: [{
        required: true,
        message: "请选择到账情况",
        trigger: "blur"
      }]
    },
    {
      label: '同步到用友',
      prop: 'isAsyncYy',
      editDisabled: true,
      type: 'select',
      search: true,
      dicUrl: '/admin/dict/item/type/yes_no',
      props: {
        label: 'label',
        value: 'value'
      },
    },
    {
      label: '附件',
      prop: 'attachment',
      slot: true,
      formslot: true
    },
    {
      label: '备注',
      type: "textarea",
      span: 24,
      prop: 'remarks',
      disabled: true,
    },
    {
      label: '审核备注',
      prop: 'auditRemark',
      type: 'textarea',
      span: 24,
    },

  ]
}

export const modifyTaskOption = {
  submitBtn: false,
  emptytBtn: false,
  row: true,
  labelWidth: 90,
  emptyBtn: false,
  // span: 12,
  column: [
    {
      label: '项目编号',
      prop: 'projectNo',
      span: 24,
      formslot: true,
    },
    {
      label: '项目名称',
      prop: 'projectName',
      hide: true,
      formslot: true,
    },
    {
      label: '立项金额',
      prop: 'totalIncome',
      formslot: true,
    },
    {
      label: '到账公司',
      prop: 'companyName',
    },
    {
      label: '到账时间',
      prop: 'arrivedTime',
      type: 'date',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
    },
    {
      label: '到账金额',
      prop: 'arrivedMoney',
      type: 'number',
    },
    {
      label: '到账情况',
      prop: 'arrivedStatus',
      dicUrl: '/admin/dict/item/type/train_arrived_status',
      type: 'select',
      props: {
        label: 'label',
        value: 'value'
      },
      rules: [{
        required: true,
        message: "请选择到账情况",
        trigger: "blur"
      }]
    },
    {
      label: '附件',
      prop: 'attachment',
      slot: true,
      formslot: true
    },
    {
      label: '备注',
      type: "textarea",
      span: 24,
      prop: 'remarks',
    },
    {
      label: '驳回原因',
      prop: 'approveRemarks',
      disabled: true,
      type: 'textarea',
      span: 24,
    },
    {
      label: '审核备注',
      prop: 'auditRemark',
      type: 'textarea',
      span: 24,
    },

  ]
}
