const ECoilPrintType = { '原料标签': '2', '成品标签': '3', '镀锌成品': '4', '镀铬成品': 'ge', '镀锌原料': '5', '脱脂原料': '6', '分条成品': 'split', } /** * 根据钢卷信息获取打印的标签类型 * @param {*} coil 钢卷信息 * @returns 打印的标签类型 */ export const getCoilTagPrintType = (coil) => { const itemName = coil.itemName || ''; const itemType = coil.itemType || ''; const warehouseId = coil.warehouseId || ''; let type = '2' // 在镀锌颜料库的卷使用镀锌原料标签 if (itemType == 'raw_material' && (warehouseId == '1988150263284953089' || warehouseId == '1988150487185289217')) { type = ECoilPrintType['镀锌原料']; } // 脱脂原料库 else if (itemType == 'raw_material' && (warehouseId == '1988150545175736322')) { type = ECoilPrintType['脱脂原料']; } // 分条成品库 else if (itemType == 'product' && (warehouseId == '1988150210872930306' || warehouseId == '1988150800092950529' || warehouseId == '1988150380649967617' || warehouseId == '1988151027466170370')) { type = ECoilPrintType['分条成品']; } // 其他卷使用成品标签 else if (itemType == 'raw_material') { type = ECoilPrintType['原料标签']; } else if (itemType == 'product' && itemName == '冷硬卷') { type = ECoilPrintType['成品标签']; } else if (itemType == 'product' && itemName == '热轧卷板') { type = ECoilPrintType['成品标签']; } else if (itemType == 'product' && itemName == '镀锌卷') { type = ECoilPrintType['镀锌成品']; } else if (itemType == 'product' && itemName == '冷轧卷') { type = ECoilPrintType['成品标签']; } else if (itemType == 'product' && itemName == '镀铬卷') { type = ECoilPrintType['镀铬成品']; } else { type = ECoilPrintType['成品标签']; } return type }