/*
 *    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 {YES_OR_NO} from "@/const/crud/asset/assets/assetassets";

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  column: [
    {
      label: '单号',
      prop: 'applyNo',
      search:true,
      addDisplay: false,
      editDisplay: false,
    },
    {
      label: '预算项目',
      prop: 'budgetId',
      type: 'select',
      span:24,
      dicUrl: '/finance/financetemporarycatebudget/list',
      props: {
        label: 'title',
        value: 'id'
      },
      rules: [{          //自定义规则
        required: true,
        trigger: 'blur',
        message:"请选择项目"
      }],
      search:true
    },
	  {
      label: '申请时间',
      prop: 'createTime',
      type:'date',
      format:'yyyy-MM-dd HH:mm:ss',
      addDisplay: false,
      editDisplay: false,
      rules: [{          //自定义规则
        required: true,
        trigger: 'blur',
        message:"请选择申请时间"
      }],
    },

	  {
      label: '申请人',
      prop: 'userPeople',
      type: 'select',
      filterable:true,
      addDisplay: false,
      editDisplay: false,
      search:true,
      dicUrl: '/finance/financetemporarycatebudget/listUserPeople',
      props: {
        label: 'remark',
        value: 'userPeople',
      },
    },
	  {
      label: '申请金额',
      prop: 'money',
      type:'number',
      span:24,
      precision: 2,
      min:0,
      rules:[
        {
          required: true,
          trigger: 'blur',
          message:"请填写申请金额"
        }
      ]
    },
    {
      label: '对方单位或报销收款人',
      prop: 'formObj',
      span:24,
      rules:[
        {
          required: true,
          trigger: 'blur',
          message:"请填写对方单位或报销收款人"
        }
      ]
    },
	  {
      label: '发票',
      prop: 'fpUrl',
      span:24,
      slot: true,
      formslot: true
    },
	  {
      label: '附件',
      span:24,
      prop: 'fjUrl',
      slot: true,
      formslot: true
    },
	  {
      label: '申请原因',
      span:24,
      prop: 'applyRemark',
      type:'textarea',
      row:true,
    },

	  {
      label: '是否付讫',
      prop: 'isPaid',
      type: 'select',
      search:true,
      dicUrl:'/admin/dict/item/type/yes_no',
      props:{
        label:'label',
        value:'value'
      },
      addDisplay: false,
      editDisplay: false,
    },
	  {
      label: '是否撤销',
      prop: 'isCancel',
      type: 'select',
      dicUrl:'/admin/dict/item/type/yes_no',
      props:{
        label:'label',
        value:'value'
      },
      addDisplay: false,
      editDisplay: false,
    },
	  {
      label: '财务记账凭证',
      prop: 'jzUrl',
      addDisplay: false,
      editDisplay: false,
      span:24,
      slot: true,
      formslot: true
    },
	  {
      label: '财务备注',
      prop: 'cwRemark',
      addDisplay: false,
      editDisplay: false,
    },
  ]
}
