/*
 *    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 states=[
  {
    label:'审核中',
    value:'-1'
  },
  {
    label:'审核完成',
    value:'0'
  },
  {
    label:'审核不通过',
    value:'2'
  },
]
export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  column: [
    {
      label: '主键',
      prop: 'id',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
    {
      label: '报废单号',
      prop: 'invalidNo',
    },
    {
      label: '资产编码',
      prop: 'code',
    },
    {
      label: '资产名称',
      prop: 'goodsName',
    },
    {
      label: '保管人',
      prop: 'belongTeacherNo',
    },
    {
      label: '金额',
      prop: 'price',
    },
	  {
      label: '报废原因',
      prop: 'invalidReason'
    },
    {
      label: '部门编码',
      prop: 'deptCode',
      type:'select',
      dicUrl: '/basic/basicdept/getDeptListByLevelTwo',
      props:{
        label:'deptName',
        value:'deptCode'
      }
    },
    {
      label: '存放地点',
      prop: 'place',
    },
    {
      label: '预计报废日期',
      prop: 'invalidDate',
    },
    {
      label: '实际报废日期',
      prop: 'invalidActualDate',
    },
    {
      label: '备注',
      prop: 'remarks'
    },
  ]
}

export const tableDictItemOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  refreshBtn: false,
  searchSize: 'mini',
  showSummary:true,
  sumColumnList: [
    {
      name: 'price',
      type: 'sum'
    },
    {
      name: 'num',
      type: 'sum'
    }
  ],
  column: [
    {
      label: '主键',
      prop: 'id',
      hide: true,
      addDisplay:false,
      editDisabled:true,
      editDisplay:false,
      visdiplay:false
    },
    {
      label: '报废单号',
      prop: 'invalidNo',
      search:true
    },
    {
      label: '申请时间',
      prop: 'createTime',
      type: 'date',          // 添加这一行
      format: 'yyyy-MM-dd',
    },
    {
      label: '资产编码',
      prop: 'code',
      hide: true,
    },
    {
      label: '金额',
      prop: 'price',
    },
    {
      label: '保管人-工号',
      prop: 'belongTeacherNo',
      hide: true,
    },
    {
      label: '保管人-姓名',
      prop: 'belongRealName',
      hide: true,
    },
    {
      label: '部门编码',
      prop: 'deptCode',
      type:'select',
      addDisplay: false,
      search:true,
      editDisplay: false,
      dicUrl: '/basic/basicdept/getDeptListByLevelTwo',
      props:{
        label:'deptName',
        value:'deptCode'
      }
    } ,{
      label: '报废原因',
      prop: 'invalidReason',
    },{
      label: '开始时间',
      prop: 'beginTime',
      type: 'date',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd 00:00:00',
      editDisplay: false,
      addDisplay: false,
      search:true,
      hide: true
    },{
      label: '结束时间',
      prop: 'endTime',
      type: 'date',
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd 23:59:59',
      editDisplay: false,
      addDisplay: false,
      search:true,
      hide: true
    },
    {
      label: '存放地点',
      prop: 'place',
      hide: true,
    },
    {
      label: '预计报废日期',
      prop: 'invalidDate',
      hide: true,
    },
    {
      label: '实际报废日期',
      prop: 'invalidActualDate',
    },
    {
      label: '审核状态',
      prop: 'procInsStatus',
    },
    {
      label: '审核状态',
      type:'select',
      prop: 'status',
      searchFilterable:true,
      dicData:states,
      props:{
        label:'label',
        value:'value'
      },
      search:true,
      hide:true
    },
    {
      label: '报废资产数量',
      prop: 'num',
    },
    {
      label: '报废类型',
      prop: 'type',
      type:'select',
      search:true,
      dicData:[{label:"电子废物",value:"0"},{label:"土地房屋",value:"1"},{label:"汽车类",value:"2"},{label:"其他",value:"3"}],
      props:{
        label:'label',
        value:'value'
      },
    },
    {
      label: '审核备注',
      prop: 'procInsRemork',
    }
  ]
}
