import service from '@/utils/request'

/** 员工基本资料管理 */
//1.获取部门列表
export const getDepartment = (data) => {
    return service({
        url: '/mes_server/Staff/getDepartment',
        method: 'get',
        data
    })
}
//2.获取员工信息列表
export const getStaffList = (params) => {
    return service({
        url: '/mes_server/Staff/getStaffList',
        method: 'get',
        params
    })
}
// 3.获取员工资料
export const getStaffInfo = (params) => {
    return service({
        url: '/mes_server/staff/getStaffInfo',
        method: 'get',
        params
    })
}
//3.修改员工资料
export const ygjbzledit = (data) => {
    return service({
        url: '/mes_server/staff/edit',
        method: 'post',
        data
    })
}

/** 产品管理 */
//1.获取客户信息
export const getCustom = (data) => {
    return service({
        url: '/mes_server/Custom/getCustom',
        method: 'get',
        data
    })
}
//2.获取产品资料列表
export const getProduct = (params) => {
    return service({
        url: '/mes_server/Product/getProduct',
        method: 'get',
        params
    })
}
//3.获取单个产品基础数据
export const getProductData = (params) => {
    return service({
        url: '/mes_server/Product/getProductData',
        method: 'get',
        params
    })
}
//4.获取单个工艺数据（排产参数调整）
export const getProductGy = (params) => {
    return service({
        url: '/mes_server/product/getProductGy',
        method: 'get',
        params
    })
}
//5.修改产品工艺(排产参数调整)
export const editGy = (data) => {
    return service({
        url: '/mes_server/product/editGy',
        method: 'post',
        data
    })
}
//6.修改产品基本资料
export const editProduct = (data) => {
    return service({
        url: '/mes_server/product/editProduct',
        method: 'post',
        data
    })
}
//7.设置产品状态
export const setProductStatus = (data) => {
    return service({
        url: '/mes_server/product/setProductStatus',
        method: 'post',
        data
    })
}
//8.1获取产品工艺数量
export const getGyTotal = (params) => {
    return service({
        url: '/mes_server/product/getGyTotal',
        method: 'get',
        params
    })
}
// 8.2产品工艺复制(数据库不支持插入数据)
export const copyProductGy = (data) => {
    return service({
        url: '/mes_server/product/copyProductGy',
        method: 'post',
        data
    })
}
//9.工艺方案更名
export const editGyName = (data) => {
    return service({
        url: '/mes_server/product/editGyName',
        method: 'post',
        data
    })
}
//10.工艺方案附加
export const editGyNo = (data) => {
    return service({
        url: '/mes_server/product/editGyNo',
        method: 'post',
        data
    })
}
//11.计损色数修正
export const editGyMs = (data) => {
    return service({
        url: '/mes_server/product/editGyMs',
        method: 'post',
        data
    })
}
//12.质检废品系数
export const editGyWaste = (data) => {
    return service({
        url: '/mes_server/product/editGyWaste',
        method: 'post',
        data
    })
}

//3.1获取产品印件资料
export const getProductYjInfo = (params) => {
    return service({
        url: '/mes_server/Product/getProductYjInfo',
        method: 'get',
        params
    })
}
//3.2修改产品印件资料
export const editProductYjInfo = (data) => {
    return service({
        url: '/mes_server/Product/editProductYjInfo',
        method: 'post',
        data
    })
}
//3.3新增产品印件资料
export const addProductYjInfo = (data) => {
    return service({
        url: '/mes_server/Product/addProductYjInfo',
        method: 'post',
        data
    })
}
//3.4获取印件代码及名称
export const getProductYjList = (params) => {
    return service({
        url: '/mes_server/Product/getProductYjList',
        method: 'get',
        params
    })
}
/3.5获取纸张代号及名称/
export const getProductZzList = (params) => {
    return service({
        url: '/mes_server/Product/getProductZzList',
        method: 'get',
        params
    })
}
//3.6工艺资料-获取产品工艺资料
export const getProductGyInfo = (params) => {
    return service({
        url: '/mes_server/Product/getProductGyInfo',
        method: 'get',
        params
    })
}
//3.7工艺资料-获取车间及工艺名称
export const getDepartName = (params) => {
    return service({
        url: '/mes_server/Product/getDepartName',
        method: 'get',
        params
    })
}
//3.8工艺资料-新增产品工艺
export const addProductGyInfo = (data) => {
    return service({
        url: '/mes_server/Product/addProductGyInfo',
        method: 'post',
        data
    })
}
//3.8获取损耗
export const getProcess = (params) => {
    return service({
        url: '/mes_server/Process/getProcess',
        method: 'get',
        params
    })
}
//3.8获取单个损耗
export const getProcessLoss = (params) => {
    return service({
        url: '/mes_server/Process/getProcessLoss',
        method: 'get',
        params
    })
}
//3.9印版资料-获取产品印版资料
export const getProductYbInfo = (params) => {
    return service({
        url: '/mes_server/Product/getProductYbInfo',
        method: 'get',
        params
    })
}
//3.10印版资料-修改产品印版资料
export const editProductYbInfo = (data) => {
    return service({
        url: '/mes_server/Product/editProductYbInfo',
        method: 'post',
        data
    })
}

//3.11印版资料-获取存货名称列表
export const getProductYbMaterialList = (params) => {
    return service({
        url: '/mes_server/Product/getProductYbMaterialList',
        method: 'get',
        params
    })
}

//3.12印版资料-获取详细存货名称
export const getProductYbMaterialDetail = (params) => {
    return service({
        url: '/mes_server/Product/getProductYbMaterialDetail',
        method: 'get',
        params
    })
}

//3.13印版资料-新增产品印版资料
export const addProductYbInfo = (data) => {
    return service({
        url: '/mes_server/Product/addProductYbInfo',
        method: 'post',
        data
    })
}


/** 生产管理 工单资料管理*/
// 1.工单资料菜单列表
export const DataList = (params) => {
    return service({
        url: '/mes_server/work_order/DataList',
        method: 'get',
        params
    })
}
// 工单资料
export const WorkList = (params) => {
    return service({
        url: '/mes_server/work_order/WorkList',
        method: 'get',
        params
    })
}
//工单印件、工艺、BOM详情
export const workOrderListDetail = (params) => {
    return service({
        url: '/mes_server/work_order/workOrderListDetail',
        method: 'get',
        params
    })
}
//工单查改->获取工单信息
export const DataCorrection = (params) => {
    return service({
        url: '/mes_server/work_order/DataCorrection',
        method: 'get',
        params
    })
}
//工单差改->修改工单信息
export const WorkOrderEdit = (data) => {
    return service({
        url: '/mes_server/work_order/WorkOrderEdit',
        method: 'post',
        data
    })
}
//引用产品资料->获取产品资料
export const ProductInformation = (params) => {
    return service({
        url: '/mes_server/work_order/ProductInformation',
        method: 'get',
        params
    })
}

//引用产品资料->修改产品资料
export const ProductInformationEdit = (params) => {
    return service({
        url: '/mes_server/work_order/ProductInformationEdit',
        method: 'post',
        params
    })
}
//工艺流程调整->获取当前工单工艺资料
export const ProcessFlow = (params) => {
    return service({
        url: '/mes_server/work_order/ProcessFlow',
        method: 'get',
        params
    })
}
//工艺流程调整->参照工单列表获取
export const ReferenceWorkOrder = (params) => {
    return service({
        url: '/mes_server/work_order/ReferenceWorkOrder',
        method: 'get',
        params
    })
}
//工艺流程调整->工艺资料修改
export const ProcessCopy = (data) => {
    return service({
        url: '/mes_server/work_order/ProcessCopy',
        method: 'post',
        data
    })
}
// 查改U8工单（工单删除）
export const U8DataCorrection = (params) => {
    return service({
        url: '/mes_server/work_order/U8DataCorrection',
        method: 'get',
        params
    })
}
//质检废品系数->质检工艺数据获取
export const TestCoefficient = (params) => {
    return service({
        url: '/mes_server/work_order/TestCoefficient',
        method: 'get',
        params
    })
}
//质检废品系数->质检系数更新
export const TestCoefficientEdit = (data) => {
    return service({
        url: '/mes_server/work_order/TestCoefficientEdit',
        method: 'post',
        data
    })
}
//修正工单核算参数->数据获取
export const AccountingParameter = (params) => {
    return service({
        url: '/mes_server/work_order/AccountingParameter',
        method: 'get',
        params
    })
}
//修正工单核算参数->参数修改
export const AccountingParameterEdit = (data) => {
    return service({
        url: '/mes_server/work_order/AccountingParameterEdit',
        method: 'post',
        data
    })
}
//U8投料试算
export const U8Trial = (params) => {
    return service({
        url: '/mes_server/work_order/U8Trial',
        method: 'get',
        params
    })
}
//查改U8工单->工单列表
export const U8workOrder = (params) => {
    return service({
        url: '/mes_server/work_order/U8workOrder',
        method: 'get',
        params
    })
}
//印件资料修改
export const PrintedEdit = (data) => {
    return service({
        url: '/mes_server/work_order/PrintedEdit',
        method: 'post',
        data
    })
}
//工艺资料修改
export const ProcessDetailEdit = (data) => {
    return service({
        url: '/mes_server/work_order/ProcessDetailEdit',
        method: 'post',
        data
    })
}
//打印作业通知单
export const PrintJobOrder = (params) => {
    return service({
        url: '/mes_server/work_order/PrintJobOrder',
        method: 'get',
        params
    })
}
//工艺资料编辑->机台列表获取
export const gdzl_MachineList = (params) => {
    return service({
        url: '/mes_server/work_order/MachineList',
        method: 'get',
        params
    })
}
//工单修改->工单类型下拉列表
export const WorkOrderTypeList = (params) => {
    return service({
        url: '/mes_server/work_order/WorkOrderTypeList',
        method: 'get',
        params
    })
}
//机台产量获取
export const capacityList = (params) => {
    return service({
        url: '/mes_server/work_order/capacityList',
        method: 'get',
        params
    })
}
//新增工单->客户列表
export const ClientList  = (params) => {
    return service({
        url: '/mes_server/work_order/ClientList',
        method: 'get',
        params
    })
}
//新增工单->产品代号列表
export const ProductCodeList  = (params) => {
    return service({
        url: '/mes_server/work_order/ProductCodeList',
        method: 'get',
        params
    })
}
//新增工单->工单添加
export const WorkOrderAdd  = (data) => {
    return service({
        url: '/mes_server/work_order/WorkOrderAdd',
        method: 'post',
        data
    })
}
//打印作业通知单->工单印件及工序列表
export const PrintCodeList  = (params) => {
    return service({
        url: '/mes_server/work_order/PrintCodeList',
        method: 'get',
        params
    })
}
//打印作业通知单->工艺编号获取
export const ProcessCodeList  = (params) => {
    return service({
        url: '/mes_server/work_order/ProcessCodeList',
        method: 'get',
        params
    })
}
//新增印件资料->印件资料添加
export const PrintDetailAdd  = (data) => {
    return service({
        url: '/mes_server/work_order/PrintDetailAdd',
        method: 'post',
        data
    })
}
//新增工艺资料->工艺资料添加
export const ProcessDetailAdd  = (data) => {
    return service({
        url: '/mes_server/work_order/ProcessDetailAdd',
        method: 'post',
        params
    })
}
//新增工艺资料->印件编号获取
export const PrintDetailList  = (params) => {
    return service({
        url: '/mes_server/work_order/PrintDetailList',
        method: 'get',
        params
    })
}
//印件资料删除
export const PrintDetailDel  = (params) => {
    return service({
        url: '/mes_server/work_order/PrintDetailDel',
        method: 'get',
        params
    })
}
//工艺资料删除
export const ProcessDetailDel  = (params) => {
    return service({
        url: '/mes_server/work_order/ProcessDetailDel',
        method: 'get',
        params
    })
}
//工艺资料添加->工序损耗代码
export const WastageList  = (params) => {
    return service({
        url: '/mes_server/work_order/WastageList',
        method: 'get',
        params
    })
}

/**工单生产排单(排产管理)*/
//计划中工单
export const Project = (params) => {
    return service({
        url: '/mes_server/manufacture/Project',
        method: 'get',
        params
    })
}
//计划中工单->工艺资料
export const projectCraft = (params) => {
    return service({
        url: '/mes_server/manufacture/projectCraft',
        method: 'get',
        params
    })
}
//计划中工单->印件资料
export const projectPrint = (params) => {
    return service({
        url: '/mes_server/manufacture/projectPrint',
        method: 'get',
        params
    })
}
//左侧车间机台菜单
export const workbench = (data) => {
    return service({
        url: '/mes_server/manufacture/workbench',
        method: 'get',
        data
    })
}
//生产中工单工序接口
export const scheduleProcess = (params) => {
    return service({
        url: '/mes_server/manufacture/scheduleProcess',
        method: 'get',
        params
    })
}
//工序完工
export const complete = (params) => {
    return service({
        url: '/mes_server/manufacture/complete',
        method: 'get',
        params
    })
}
//加入排产
export const ProductionSchedulingAdd = (data) => {
    return service({
        url: '/mes_server/manufacture/ProductionSchedulingAdd',
        method: 'post',
        data
    })
}
//暂停排产
export const ProductionSchedulingPause = (data) => {
    return service({
        url: '/mes_server/manufacture/ProductionSchedulingPause',
        method: 'post',
        data
    })
}
//工序状态更正
export const ProcessStatusCorrection = (params) => {
    return service({
        url: '/mes_server/manufacture/ProcessStatusCorrection',
        method: 'get',
        params
    })
}
//班次选择列表
export const ScheduleSelection = (data) => {
    return service({
        url: '/mes_server/manufacture/ScheduleSelection',
        method: 'get',
        data
    })
}
//车间设备排程->数据展示
export const EquipmentScheduling = (params) => {
    return service({
        url: '/mes_server/manufacture/EquipmentScheduling',
        method: 'get',
        params
    })
}
//车间设备排程->数据编辑
export const EquipmentSchedulingEdit = (data) => {
    return service({
        url: '/mes_server/manufacture/EquipmentSchedulingEdit',
        method: 'post',
        data
    })
}

//排程/制程中工单
export const Schedule = (params) => {
    return service({
        url: '/mes_server/Manufacture/Schedule',
        method: 'get',
        params
    })
}

//工单状态设置
export const StatusEdit = (data) => {
    return service({
        url: '/mes_server/manufacture/StatusEdit',
        method: 'post',
        data
    })
}

//工序状态更正->编辑
export const ProcessStatusCorrectionEdit = (data) => {
    return service({
        url: '/mes_server/manufacture/ProcessStatusCorrectionEdit',
        method: 'post',
        data
    })
}

//机台制程/排程工单列表
export const MachineWorkOrderList = (params) => {
    return service({
        url: '/mes_server/manufacture/MachineWorkOrderList',
        method: 'get',
        params
    })
}
//机组调整
export const MachineTeamEdit = (params) => {
    return service({
        url: '/mes_server/Manufacture/MachineTeamEdit',
        method: 'get',
        params
    })
}

/** 7.设备运行跟踪*/
//左侧菜单
export const getTab = (params) => {
    return service({
        url: '/mes_server/facility/getTab',
        method: 'get',
        params
    })
}
//当日上报产量
export const chanLiang = (params) => {
    return service({
        url: '/mes_server/facility/chanLiang',
        method: 'get',
        params
    })
}
//当日制程检验记录
export const Inspect = (params) => {
    return service({
        url: '/mes_server/facility/Inspect',
        method: 'get',
        params
    })
}
//当前生产订单
export const Production = (params) => {
    return service({
        url: '/mes_server/facility/Production',
        method: 'get',
        params
    })
}
//设备工作清单
export const EquipmentWorklist = (params) => {
    return service({
        url: '/mes_server/facility/EquipmentWorklist',
        method: 'get',
        params
    })
}
//印件、工序、完成数量
export const Procedure = (params) => {
    return service({
        url: '/mes_server/facility/Procedure',
        method: 'get',
        params
    })
}
//班组人员及分配比例
export const Team = (params) => {
    return service({
        url: '/mes_server/facility/Team',
        method: 'get',
        params
    })
}
//当班产量明细
export const OutputDetail = (params) => {
    return service({
        url: '/mes_server/facility/OutputDetail',
        method: 'get',
        params
    })
}
//检验记录
export const InspectionRecord = (params) => {
    return service({
        url: '/mes_server/facility/InspectionRecord',
        method: 'get',
        params
    })
}
//班组维护->机台编号下拉框
export const MachineList = (params) => {
    return service({
        url: '/mes_server/facility/MachineList',
        method: 'get',
        params
    })
}
//班组维护->删除当前班组
export const teamDel = (params) => {
    return service({
        url: '/mes_server/facility/teamDel',
        method: 'get',
        params
    })
}

//获取机台编号
export const getMachineMac = (data) => {
    return service({
        url:'/mes_server/reporting_work/getMachineMac',
        method: 'get',
        data
    })
}

//6工单工序产量查核
export const getOrderProcessCount = (params) => {
    return service({
        url:'/mes_server/order_super_loss/getOrderProcessCount',
        method: 'get',
        params
    })
}

//5.1流程单查询-工单工序生产进程菜单栏
export const getOrderProcessLeft = (params) => {
    return service({
        url:'/mes_server/work_order_verification/getOrderProcessLeft',
        method: 'get',
        params
    })
}

//5.2流程单查询-获取工单工序生产进程右侧
export const getOrderProcessRight = (params) => {
    return service({
        url:'/mes_server/work_order_verification/getOrderProcessRight',
        method: 'get',
        params
    })
}
