/*
 *    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 global from "@/components/tools/commondict";
import globalDict from "@/components/newcommon/js/global_dict";
export const tableWLOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  showSummary:true,
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  sumColumnList: [
    {
      label:'合计:',
      name: 'sum',
      type: 'sum',
      decimals:1
    },
    {
      name: 'totalPrice',
      type: 'sum'
    }],
  column: [
    {
      label: '入库日期',
      prop: 'createTime',

    },

    {
      label: '入库单号',
      prop: 'inboundNo'
    },
    {
      label:'开始时间',
      prop:'beginTime',
      hide:true,
      addDisplay:false,
      editDisplay:false,
      type:'date',
      format:'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
    },
    {
      label:'结束时间',
      prop:'endTime',
      hide:true,
      addDisplay:false,
      editDisplay:false,
      type:'date',
      format:'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
    },
    {
      label: '入库部门',
      prop: 'deptCode',
      type:'select',
      dicUrl: '/basic/basicdept/getDeptListByLevelTwo',
      props: {
        label: 'deptName',
        value: 'deptCode'
      },
    },

    {
      label: '合同金额',
      prop: 'contractMoney'
    },
    {
      label: '发票金额',
      prop: 'invoiceMoney'
    },
    {
      label: '入库总金额',
      prop: 'totalPrice'
    },
    {
      label: '是否完善',
      prop: 'isPerfect',
      type:'select',
      dicData:[
        {
          label:'待完善',
          value:"0"
        },{
          label:'已完善',
          value:"1"
        },{
          label:'已完善,待审核',
          value:"3"
        }
      ]
    },
    {
      label: '审核进度',
      prop: 'isExamine',
      type:'select',
      dicData:[
        {
          label:'待部门审核',
          value:"0"
        },{
          label:'待后勤审核',
          value:"1"
        },{
          label:'审核通过',
          value:"2"
        },{
          label:'驳回',
          value:"3"
        }
      ]
    },
    {
      label: '资产类别',
      prop: 'type',
      type:'select',
      dicData:global.assets_type,
      props:{
        label:'label',
        value:'value'
      },
    },
    {
      label: '备注',
      prop: 'remarks'
    },

  ]
}
export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  showSummary:true,
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  sumColumnList: [
    {
      label:'合计:',
      name: 'sum',
      type: 'sum',
      decimals:1
    },
    {
      name: 'totalPrice',
      type: 'sum'
    }],
  column: [
    {
      label: '入库日期',
      prop: 'createTime',

    },

    {
      label: '入库单号',
      prop: 'inboundNo',
      search:true
    },
    {
      label: '履约评价单',
      prop: 'purchasingNo',
      search:true
    },
    {
      label:'开始时间',
      prop:'beginTime',
      search:true,
      hide:true,
      addDisplay:false,
      editDisplay:false,
      type:'date',
      format:'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
    },
    {
      label:'结束时间',
      prop:'endTime',
      search:true,
      hide:true,
      addDisplay:false,
      editDisplay:false,
      type:'date',
      format:'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
    },
    {
      label: '入库部门',
      prop: 'deptCode',
      search:true,
      type:'select',
      dicUrl: '/basic/basicdept/getDeptListByLevelTwo',
      props: {
        label: 'deptName',
        value: 'deptCode'
      },
    },

    {
      label: '合同金额',
      prop: 'contractMoney'
    },
    {
      label: '发票金额',
      prop: 'invoiceMoney'
    },
    {
      label: '入库总金额',
      prop: 'totalPrice'
    },
    {
      label: '是否完善',
      prop: 'isPerfect',
      type:'select',
      dicData:[
        {
          label:'待完善',
          value:"0"
        },{
          label:'已完善',
          value:"1"
        },{
          label:'已完善,待审核',
          value:"3"
        }
      ]
    },
    {
      label: '审核进度',
      prop: 'isExamine',
      type:'select',
      search:true,
      dicData:[
        {
          label:'待提交',
          value:"-1"
        },
        {
          label:'待部门审核',
          value:"0"
        },{
          label:'待后勤审核',
          value:"1"
        },{
          label:'资产负责人审核',
          value:"4"
        },{
          label:'审核通过',
          value:"2"
        },{
          label:'驳回',
          value:"3"
        }
      ]
    },
    {
      label: '审核意见',
      prop: 'examineValue',
    },
    // {
    //   label: '资产类别',
    //   prop: 'type',
    //   type:'select',
    //   dicData:global.assets_type,
    //   props:{
    //     label:'label',
    //     value:'value'
    //   },
    //   search:true
    // },
	  {
      label: '备注',
      prop: 'remarks'
    },

  ]
}

export const tableDelOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  showSummary:true,
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  sumColumnList: [
    {
      label:'合计:',
      name: 'sum',
      type: 'sum',
      decimals:1
    },
    {
      name: 'totalPrice',
      type: 'sum'
    }],
  column: [
    {
      label: '删除时间',
      prop: 'createTime',
    },
    {
      label: '入库单号',
      prop: 'inboundNo',
      search:true
    },
    {
      label:'开始时间',
      prop:'beginTime',
      hide:true,
      addDisplay:false,
      editDisplay:false,
      type:'date',
      format:'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
    },
    {
      label:'结束时间',
      prop:'endTime',
      hide:true,
      addDisplay:false,
      editDisplay:false,
      type:'date',
      format:'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
    },
    {
      label: '入库部门',
      prop: 'deptCode',
      search:true,
      type:'select',
      dicUrl: '/basic/basicdept/getDeptListByLevelTwo',
      props: {
        label: 'deptName',
        value: 'deptCode'
      },
    },

    {
      label: '合同金额',
      prop: 'contractMoney'
    },
    {
      label: '发票金额',
      prop: 'invoiceMoney'
    },
    {
      label: '入库总金额',
      prop: 'totalPrice'
    },
    {
      label: '备注',
      prop: 'remarks'
    },
    {
      label: '资产类别',
      prop: 'type',
      type:'select',
      dicData:global.assets_type,
      props:{
        label:'label',
        value:'value'
      },
      search:true
    },
  ]
}
export const tableDictItemOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  menu:false,
  showSummary:true,
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  dic: [],
  sumColumnList: [
    {
      label:'合计:',
      name: 'sum',
      type: 'sum',
      decimals:1
    },
    {
      name: 'totalPrice',
      type: 'sum'
    }],
  column: [
    {
      label: '入库单号',
      prop: 'inboundNo'
    },
    {
      label: '类别编码',
      prop: 'codeEnName'
    },
    {
      label: '资产名称',
      prop: 'goodsName'
    },
    {
      label: '规格|型号',
      prop: 'spec'
    },
    {
      label: '面积',
      prop: 'area'
    },
    {
      label: '单位',
      prop: 'unit'
    },
    {
      label: '单价',
      prop: 'price'
    },
    {
      label: '库存',
      prop: 'inboundNum'
    },
    {
      label: '总金额',
      prop: 'totalPrice'
    },
    {
      label: '开始编码',
      prop: 'codeStart'
    },
    {
      label: '结束编码',
      prop: 'codeEnd'
    },
    {
      label: '是否资产',
      prop: 'isAssetValue',
      type:'select',
      dicData:[
        {
          label:'否',
          value: "0"
        },{
          label:'固定资产',
          value: "1"
        },{
          label:'无形资产',
          value: "2"
        }
      ]
    },
    {
      label: '资产用途',
      prop: 'assetUser',
      type:'select',
      dicData:globalDict.ASSET_USAGE,
    },
    {
      label: '资产类别',
      prop: 'type',
      type:'select',
      dicData:global.assets_type,
      props:{
        label:'label',
        value:'value'
      },
      search:true
    },
    {
      label: '备注',
      prop: 'remarks'
    }
  ]
}
