/*
 *    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.
 *
 */

const STATUS=[
  {label:'待提交',value:'0'},
  {label:'待审核',value:'100'},
  {label:'通过',value:'200'},
  {label:'驳回',value:'-100'}
]

const BATCH_STATUS_DIC=[
  {label:'待提交',value:"0"},
  {label:'已提交，未付讫',value:"1"},
  {label:'已付款',value:"2"},
  {label:'驳回',value:"3"}
]

const DICT_YES_OR_NO=[
  {label:"是",value:"1"},
  {label:"否",value:"0"}
]

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  // selection:true,
  reserveSelection:false,
  menuWidth:100,
  dic: [],
  column: [
    {
      label: '推送批次',
      prop: 'batchNo',
      addDisplay:false,
      editDisabled:true,
      search:true,
      minWidth:145
    },
    {
      label: '推送批次备注',
      prop: 'remarks',
      hide:true,
      search:true
    },
    {
      label: '单号',
      prop: 'orderNum',
      addDisplay:false,
      editDisabled:true,
      search:true,
      minWidth:180,
      fontSize:10
    },
    {
      label: '标题',
      prop: 'title',
      addDisplay:false,
      editDisabled:true,
      search:true,
      minWidth:180,
      fontSize:10
    },
    {
      label: '项目编号',
      prop: 'projectNo',
      addDisplay:false,
      editDisabled:true,
      search:true,
      minWidth:100
    },
    {
      label: '造单总额(￥)',
      prop: 'totalMoney',
      display:false,
      minWidth:120
    },
    {
      label: '人员信息',
      prop: 'userInfo',
      searchTip:'姓名,身份证,工号',
      hide:true,
      display:false,
      search:true
    },
	  {
      label: '类别',
      prop: 'cateId',
      type:'tree',
      dicUrl:'/finance/financecategory/cateTree',
      rules: [{
        required: true,
        message: '请选择类别',
        trigger: 'blur'
      }],
      minWidth:100
    },
	  {
      label: '收入类目',
      prop: 'fundChannel',
      type:'select',
      dicUrl:'/finance/financefundssource/list',
      props:{
        label:'sourceName',
        value:'id'
      },
      search:true,
      searchFilterable:true,
      rules: [{
        required: true,
        message: '请选择收入类目',
        trigger: 'blur'
      }],
      minWidth:150
    },
    {
      label: '状态',
      prop: 'status',
      type:'select',
      search:true,
      dicData:STATUS,
      props:{
        label:'label',
        value:'value'
      },
      display:false
    },
    {
      label: '批次状态',
      prop: 'batchStatus',
      type:'select',
      search:true,
      dicData:BATCH_STATUS_DIC,
      props:{
        label:'label',
        value:'value'
      },
      display:false
    },
    // {
    //   label: '标记推送',
    //   prop: 'sendStatus',
    //   type:'select',
    //   search:true,
    //   dicData:DICT_YES_OR_NO,
    //   props:{
    //     label:'label',
    //     value:'value'
    //   },
    //   display:false
    // },
    {
      label: '通过时间',
      prop: 'passTime',
      type:'date',
      format:'yyyy-MM-dd',
      addDisplay:false,
      editDisabled:true,
      minWidth:120
    },
    {
      label: '付讫时间',
      prop: 'payTime',
      type:'date',
      search:true,
      format:"yyyy-MM-dd",
      valueFormat:"yyyy-MM-dd",
      display:false,
      minWidth:120
    },
    {
      label: '是否导出',
      prop: 'exportStatus',
      type:'select',
      search:true,
      fixed:true,
      slot:true,
      dicData:DICT_YES_OR_NO,
      props:{
        label:'label',
        value:'value'
      },
      display:false
    },
    {
      label: '创建人',
      prop: 'createBy',
      hide:true,
      addDisplay:false,
      editDisabled:true
    },
    {
      label: '创建人',
      prop: 'createByStr',
      addDisplay:false,
      editDisabled:true
    },
    {
      label: '审核人',
      prop: 'examByStr',
    },
    {
      label: '创建时间',
      prop: 'createTime',
      type:'date',
      format:"yyyy-MM-dd",
      addDisplay:false,
      editDisabled:true,
      minWidth:120
    },

  ]
}

export const deptTableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  column: [
    {
      label: '部门',
      prop: 'deptName'
    },
    {
      label: '发放金额',
      prop: 'workMoney'
    }
  ]
}

export const cateTableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,

  dic: [],
  column: [
    {
      label: '类目',
      prop: 'cateName'
    },
    {
      label: '发放金额',
      prop: 'workMoney'
    }
  ]
}

export const detailFormOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  menu:false,

  dic: [],
  column: [
    {
      label: '部门',
      prop: 'deptName'
    },
    {
      label: '类目',
      prop: 'cateName'
    },
    {
      label: '单号',
      prop: 'orderNum'
    },
    {
      label: '发放金额',
      prop: 'workMoney'
    }
  ]
}


