import request from '@/service'


// const downloadPackaged = (data) => {
//   return request({
//     url: '/launch/download/packaged',
//     method: 'POST',
//     data,
//     responseType:'blob'
//   })
// }

const dictionarySearch = (data) => {
  return request({
    url: '/employee-file/dictionary/search',
    method: 'POST',
    data,
  })
}
const employeeFileList = (data) => {
  return request({
    url: '/employee-file/list',
    method: 'POST',
    data,
  })
}
const employeeFileUpdate = (data) => {
  return request({
    url: '/employee-file/update',
    method: 'POST',
    data,
  })
}
const employeeFileCreate = (data) => {
  return request({
    url: '/employee-file/create',
    method: 'POST',
    data,
  })
}
const employeeFileCreateDisplay = (data) => {
  return request({
    url: '/employee-file/create/display',
    method: 'POST',
    data,
  })
}
const employeeFileDetailsDisplay = (data) => {
  return request({
    url: '/employee-file/details/display',
    method: 'POST',
    data,
  })
}
const employeeFileAllDisplay = (data) => {
  return request({
    url: '/employee-file/all/display',
    method: 'POST',
    data,
  })
}
const positionV2List = (data) => {
  return request({
    url: '/position/v2/list',
    method: 'POST',
    data,
  })
}

const departmentV2TreeAll = (data) => {
  return request({
    url: '/department/v2/tree/all',
    method: 'POST',
    data,
  })
}

const departmentListAll = (data) => {
  return request({
    url: '/department/list/all',
    method: 'POST',
    data,
  })
}

const departmentV2Position = (data) => {
  return request({
    url: '/department/v2/position',
    method: 'POST',
    data,
  })
}

const employeeFileExcel = (data) => {
  return request({
    url: '/employee-file/download/excel',
    method: 'POST',
    data,
    responseType:'blob'
  })
}

const employeeNewChanges = (data) => {
  return request({
    url: '/employee-file/new/changes',
    method: 'POST',
    data,
  })
}

const clockList = (data) => {
  return request({
    url: '/clock/list',
    method: 'POST',
    data,
  })
}

const clockBatchBind = (data) => {
  return request({
    url: '/clock/batch/bind',
    method: 'POST',
    data,
  })
}

const clockBatchUntie = (data) => {
  return request({
    url: '/clock/batch/untie',
    method: 'POST',
    data,
  })
}

const workingTimePositions = (data) => {
  return request({
    url: '/oa/working-time/positions',
    method: 'POST',
    data,
  })
}

const setAttendanceGroup = (data) => {
  return request({
    url: '/employee-file/set/attendance/group',
    method: 'POST',
    data,
  })
}

const employeeFileFindChangesRecord = (data) => {
  return request({
    url: '/employee-file/find/changes/record',
    method: 'POST',
    data,
  })
}

const employeeFileDownloadChangesRecord = (data) => {
  return request({
    url: '/employee-file/download/changes/record',
    method: 'POST',
    data,
    responseType:'blob'
  })
}

const employeeFileCreateRewardsPunishments = (data) => {
  return request({
    url: '/employee-file/create/rewards/punishments',
    method: 'POST',
    data,
  })
}

const employeeFileCreateTurnoverRecord = (data) => {
  return request({
    url: '/employee-file/create/turnover/record',
    method: 'POST',
    data,
  })
}

const employeeFileCreateContractRecord = (data) => {
  return request({
    url: '/employee-file/create/contract/record',
    method: 'POST',
    data,
  })
}

const employeeFileFindContractRecord = (data) => {
  return request({
    url: '/employee-file/find/contract/record',
    method: 'POST',
    data,
  })
}

const employeeFileDownloadContractRecord = (data) => {
  return request({
    url: '/employee-file/download/contract/record',
    method: 'POST',
    data,
    responseType:'blob'
  })
}

const employeeFileFindreWardsPunishments = (data) => {
  return request({
    url: '/employee-file/find/rewards/punishments',
    method: 'POST',
    data,
  })
}

const employeeFileDownloadRewardsPunishments = (data) => {
  return request({
    url: '/employee-file/download/rewards/punishments',
    method: 'POST',
    data,
    responseType:'blob'
  })
}

const employeeFileFindPayrollRecord = (data) => {
  return request({
    url: '/employee-file/find/payroll/record',
    method: 'POST',
    data,
  })
}

const employeeFileDownloadPayrollRecord = (data) => {
  return request({
    url: '/employee-file/download/payroll/record',
    method: 'POST',
    data,
    responseType:'blob'
  })
}

const employeeFileFindTurnoverRecord = (data) => {
  return request({
    url: '/employee-file/find/turnover/record',
    method: 'POST',
    data,
  })
}

const employeeFileDownloadTurnoverRecord = (data) => {
  return request({
    url: '/employee-file/download/turnover/record',
    method: 'POST',
    data,
    responseType:'blob'
  })
}

const employeeFileFindOutStanding = (data) => {
  return request({
    url: '/employee-file/find/out/standing',
    method: 'POST',
    data,
  })
}

const employeeFileFindReminderRecord = (data) => {
  return request({
    url: '/employee-file/find/reminder/record',
    method: 'POST',
    data,
  })
}

const employeeFileProcessingReminder = (data) => {
  return request({
    url: '/employee-file/processing/reminder',
    method: 'POST',
    data,
  })
}

const employeeFileUpdateChangesAttachment = (data) => {
  return request({
    url: '/employee-file/update/changes/attachment',
    method: 'POST',
    data,
  })
}

const employeeFileUpdateContractAttachment = (data) => {
  return request({
    url: '/employee-file/update/contract/attachment',
    method: 'POST',
    data,
  })
}

const oaLeaveBalanceBalanceDownloadExcel = (data) => {
  return request({
    url: '/oa/leave-balance/balance-download-excel',
    method: 'POST',
    data,
    responseType:'blob'
  })
}

const oaLeaveBalanceBalanceUpdateAnnual = (data) => {
  return request({
    url: '/oa/leave-balance/balance-update-annual',
    method: 'POST',
    data,
  })
}

const approvalFindturnover = (data) => {
  return request({
    url: '/approval/v2/find-turnover',
    method: 'POST',
    data,
  })
}

export  {
  dictionarySearch,
  employeeFileList,
  employeeFileUpdate,
  employeeFileCreate,
  employeeFileCreateDisplay,
  employeeFileDetailsDisplay,
  employeeFileAllDisplay,
  positionV2List,
  employeeFileExcel,
  departmentV2TreeAll,
  departmentV2Position,
  employeeNewChanges,
  clockList,
  clockBatchBind,
  clockBatchUntie,
  workingTimePositions,
  setAttendanceGroup,
  departmentListAll,
  employeeFileFindChangesRecord,
  employeeFileDownloadChangesRecord,
  employeeFileCreateRewardsPunishments,
  employeeFileCreateTurnoverRecord,
  employeeFileCreateContractRecord,
  employeeFileDownloadContractRecord,
  employeeFileFindreWardsPunishments,
  employeeFileDownloadRewardsPunishments,
  employeeFileFindPayrollRecord,
  employeeFileDownloadPayrollRecord,
  employeeFileFindTurnoverRecord,
  employeeFileDownloadTurnoverRecord,
  employeeFileFindContractRecord,
  employeeFileFindOutStanding,
  employeeFileFindReminderRecord,
  employeeFileProcessingReminder,
  employeeFileUpdateChangesAttachment,
  employeeFileUpdateContractAttachment,
  oaLeaveBalanceBalanceDownloadExcel,
  oaLeaveBalanceBalanceUpdateAnnual,
  approvalFindturnover,
}
