// 审核状态
export const auditStatus = [
  { code: 1, label: '待审核', class: 'ele-text-primary' },
  { code: 2, label: '已审核', class: 'ele-text-primary' },
  { code: 3, label: '已驳回', class: 'ele-text-danger' }
];

// 是否
export const isOrNot = [
  { code: 1, label: '是' },
  { code: 0, label: '否' }
];

export const cm_workOrderStatus = [
  { code: 0, label: '待接收' },
  { code: 1, label: '执行中' },
  { code: 2, label: '待审核' },
  { code: 3, label: '完成' },
  { code: 4, label: '已撤回' },
  { code: 5, label: '已驳回' }
];


export const tableHeader = selectEquiType => {
	
	// singleReport 批量0  单个1

	// 1：物料；4：生产设备; 5：模具；6：备品备件; 7：周转车；8：舟皿；9：产品；10：消耗材料，11：干燥区，12.质检，13.包装材料，14.工装夹具 ，15.刀具 ,99.其他
	switch (+selectEquiType) {
		case 1:
			return [{
					label: '型号',
					prop: 'modelType'
				},
				{
					label: '规格',
					prop: 'specification'
				},

				{
					label: '牌号',
					prop: 'brandNum'
				},

				// {
				// 	label: '包装库存',
				// 	prop: '',
				// 	formatter(row) {
				// 		return `${row.packingCountBase || '0'}/${row.minUnit || ''}`
				// 	}
				// },

				// {
				// 	label: '计量库存数量',
				// 	prop: '',
				// 	formatter(row) {
				// 		return `${row.availableCountBase || '0'}/${row.measuringUnit || ''}`
				// 	}
				// }
			]



		case 4:
			return [{
					label: '规格',
					prop: 'specification'
				},

				{
					label: '型号',
					prop: 'modelType'
				},

				{
					label: '工位',
					prop: 'workstationName'
				},



			]


		case 5:
			return [{
					label: '牌号',
					prop: 'brandNum'
				},
				{
					label: '型号',
					prop: 'modelType'
				},
				{
					label: '模孔数量',
					prop: 'dieHoleNum'
				},

				{
					label: '芯棒直径',
					prop: 'mandrelDiameter',

				},
				{
					label: '收缩系数',
					prop: 'shrinkEffictive',
				},
				{
					label: '已压制次数',
					prop: '',
					formatter(row) {
						return row.extInfo.startCyTimes || 0
					}
				},

				{
					label: '最大压制次数',
					prop: '',
					formatter(row) {
						return row.extInfo.maxCyTimes
					}
				}
			]


		case 7:
			return [
				{
						label: '编号', 
						prop: 'codeNumber'
				},
				{
					label: '规格',
					prop: 'modelType'
				},
				{
					label: '材质',
					prop: 'materialQuality',

				},
				{
					label: '长宽高',
					prop: '',
					formatter(row) {
						if (!row?.extInfo) return ''
						const extendField = row.extInfo
						return `${extendField.vehicleLen || '-'}*${extendField.wilde || '-'}*${
											  extendField.hight || '-'
											}`

					}
				}
			]


		case 8: //'舟皿'
			return [{
					label: '规格',
					prop: 'specification'
				},
				{
					label: '型号',
					prop: 'modelType'
				},
				
				{
					label: '槽数',
					prop: '',
					formatter(row) {
						return row.extInfo.slotNum
					}
				},
				
			


			]
		case 10:
			return []

		case 11:
			return [


			]

		case 13:
			return [

				{
					label: '规格',
					prop: 'specification'
				},

				{
					label: '型号',
					prop: 'modelType'
				},

			]


		case 14:
			return []

		case 23:
			return [

				{
					label: '型号',
					prop: 'modelType'
				},
				{
					label: '规格',
					prop: 'specification'
				},
				{
					label: '牌号',
					prop: 'brandNum'
				},

			]

		case 9:
			return [

				{
					label: '型号',
					prop: 'modelType'
				},
				{
					label: '规格',
					prop: 'specification'
				},
				{
					label: '牌号',
					prop: 'brandNum'
				},

			]

		case 28:
			return [

				{
					label: '型号',
					prop: 'modelType'
				},
				{
					label: '规格',
					prop: 'specification'
				},
				{
					label: '牌号',
					prop: 'brandNum'
				},

			]

	}

	return []
}