const formatter = opt => {
	return code => opt && opt[code]
}
//紧急程度
const urgent = {
	1: '普通',
	2: '紧急',
	3: '重要'
}

export default {
	// 维修工单
	repair: [{
			label: '紧急程度',
			key: 'urgent',
			formatter: formatter(urgent)
		},
		{
			label: '报修人',
			key: 'executeUserName'
		},
		{
			label: '报修原因',
			key: 'content'
		}
	],
	// 保养
	maintenance: [{
			label: '保养名称',
			key: 'planName'
		},
		{
			label: '设备分类',
			key: 'bizTypeName'
		},
		{
			label: '规则名称',
			key: 'ruleName'
		},
		{
			label: '计划完成时间',
			key: 'planFinishTime'
		}
	],
	// 巡点检
	patrol: [{
			label: '巡点检名称',
			key: 'planName'
		},
		{
			label: '设备分类',
			key: 'bizTypeName'
		},
		{
			label: '规则名称',
			key: 'ruleName'
		},
		{
			label: '计划完成时间',
			key: 'planFinishTime'
		}
	],
	// 盘点
	check: [{
			label: '盘点名称',
			key: 'planName'
		},
		{
			label: '盘点仓库',
			key: 'bizTypeName'
		},
		{
			label: '规则名称',
			key: 'ruleName'
		},
		{
			label: '计划开始时间',
			key: 'createTime'
		},
		{
			label: '计划完成时间',
			key: 'planFinishTime'
		}
	],
	// 维修报工 待办
	backlog_repair: [{
			label: '维修工单号',
			key: 'workOrderCode'
		},
		{
			label: '设备编号',
			key: 'equipmentNo'
		},
		{
			label: '设备名称',
			key: 'equipmentName'
		},
		{
			label: '报工时间',
			key: 'sendingTime'
		},
		{
			label: '申请人',
			key: 'applicantName'
		}
	],
	// 维修计划审批 待办
	backlog_repairPlan: [{
			label: '计划单号',
			key: 'workOrderCode'
		},
		{
			label: '计划名称',
			key: 'ruleName'
		},
		{
			label: '报修设备数量',
			key: 'repairEquipmentNum'
		},
		{
			label: '申请人',
			key: 'applicantName'
		}
	],
	// // 保养报工 待办
	// backlog_maintenance:[
	// 	{label: "保养工单号", key: "workOrderCode"},
	// 	{label: "设备编号", key: ""},
	// 	{label: "设备名称", key: ""},
	// 	{label: "报工时间", key: ""},
	// 	{label: "申请人", key: ""},
	// ],
	// 保养计划审批 待办
	backlog_maintenancePlan: [{
			label: '计划单号',
			key: 'workOrderCode'
		},
		{
			label: '保养名称',
			key: 'ruleName'
		},
		{
			label: '设备分类',
			key: 'equiTypeName'
		},
		{
			label: '计划完成时长',
			key: 'planFinishOften',
			formatter: val => val && `${val}分钟`
		},
		{
			label: '申请人',
			key: 'applicantName'
		}
	],
	// // 巡点检报工 待办
	// backlog_patrol:[
	// 	{label: "巡点检工单号", key: "workOrderCode"},
	// 	{label: "设备编号", key: ""},
	// 	{label: "设备名称", key: ""},
	// 	{label: "报工时间", key: ""},
	// 	{label: "申请人", key: ""},
	// ],
	// 巡点检计划审批 待办
	backlog_patrolPlan: [{
			label: '计划单号',
			key: 'workOrderCode'
		},
		{
			label: '巡点检名称',
			key: 'ruleName'
		},
		{
			label: '设备分类',
			key: 'equiTypeName'
		},
		{
			label: '计划完成时长',
			key: 'planFinishOften',
			formatter: val => val && `${val}分钟`
		},
		{
			label: '申请人',
			key: 'applicantName'
		}
	],
	// 盘点工单验收
	backlog_check: [{
			label: '盘点单号',
			key: 'workOrderCode'
		},

		{
			label: '盘点仓库',
			key: 'equipmentName'
		},
		{
			label: '盘点人',
			key: 'applicantName'
		},

		{
			label: '计划完成时间',
			key: 'planTime',
		},
		{
			label: '实际完成时间',
			key: 'workOrderTime',
		},
	],
	// 盘点计划审批
	backlog_checkPlan: [{
			label: '计划单号',
			key: 'workOrderCode'
		},
	
		{
			label: '盘点仓库',
			key: 'equiTypeName'
		},
		{
			label: '申请人',
			key: 'applicantName'
		},
		{
			label: '计划完成时长',
			key: 'sendingTime',
		},
	],
	// 出库审批
	backlog_OUT_WAREPlan: [{
			label: '出库单号',
			key: 'workOrderCode'
		},
/* 		{
			label: '来源类型',
			key: 'sourceType'
		}, */
		{
			label: '来源单号',
			key: 'sourceOrderNumber'
		},
		{
			label: '创建时间',
			key: 'createTime'
		},
		{
			label: '申请人',
			key: 'applicantName'
		}
	],
	// 入库申请
	backlog_IN_WAREPlan: [{
			label: '入库单号',
			key: 'workOrderCode'
		},
/* 		{
			label: '来源类型',
			key: 'sourceType'
		}, */
		{
			label: '来源单号',
			key: 'sourceOrderNumber'
		},
		{
			label: '创建时间',
			key: 'createTime'
		},
		{
			label: '申请人',
			key: 'applicantName'
		}
	],
	// 库存调拨
	backlog_TRANSFERPlan: [{
			label: '调拨单号',
			key: 'workOrderCode'
		},
		{
			label: '调拨类型',
			key: 'transferType',
			formatter:(val)=>{
				switch (Number(val)){
					case 1:
						return '库内调拨'
						break;
					case 2:
						return '库外调拨'
						break;
					default:
						break;
				}
			}
		},
		{
			label: '调入库',
			key: 'transferToWarehouse'
		},
		{
			label: '调出库',
			key: 'transferOutOfWarehouse'
		},
		{
			label: '创建时间',
			key: 'createTime'
		},
		{
			label: '申请人',
			key: 'applicantName'
		}
	],
	// 报损报溢 工单审批
	backlog_REPORT_LOSS_OVERFLOW: [{
			label: '报损报溢单号',
			key: 'workOrderCode'
		},
		{
			label: '名称',
			key: 'ruleName'
		},
		{
			label: '仓库',
			key: 'warehouseName'
		},
		{
			label: '创建时间',
			key: 'createTime'
		},
		{
			label: '申请人',
			key: 'applicantName'
		}
	]
}