import http from '../http'
import { https } from '../https'
export default {
  pageSampleProductReg: data =>
    http.post('/v1/sample/page-product-register', data).then(res => res),

  pageSampleProductRegHis: data =>
    http.post('/v1/sample/page-product-register-his', data).then(res => res),

  pageSampleMaterialReg: data =>
    http.post('/v1/sample/page-material-register', data).then(res => res),

  pageSampleMaterialRegHis: data =>
    http.post('/v1/sample/page-material-register-his', data).then(res => res),

  pageSampleStableReg: data =>
    http.post('/v1/sample/page-stable-register', data).then(res => res),

  pageSampleStableRegHis: data =>
    http.post('/v1/sample/page-stable-register-his', data).then(res => res),

  pageSampleEnvReg: data =>
    http.post('/v1/sample/page-env-register', data).then(res => res),

  pageSampleEnvStableReg: data =>
    http.post('/v1/sample/page-env-stable-register', data).then(res => res),

  pageSampleEnvRegHis: data =>
    http.post('/v1/sample/page-env-register-his', data).then(res => res),

  pageSampleEnvStableRegHis: data =>
    http.post('/v1/sample/page-env-stable-register-his', data).then(res => res),

  pageEnvPlanCheck: data =>
    http.post('/v1/sample/page-env-plan-check', data).then(res => res),

  pageEnvPlanCheckHis: data =>
    http.post('/v1/sample/page-env-plan-check-his', data).then(res => res),

  pageEnvPlanExecute: data =>
    http.post('/v1/sample/page-env-plan-execute', data).then(res => res),

  pageEnvPlanExecuteHis: data =>
    http.post('/v1/sample/page-env-plan-execute-his', data).then(res => res),

  pageSampleMake: data =>
    http.post('/v1/sample/page-sample-make', data).then(res => res),
  pageSampleMakeHis: data =>
    http.post('/v1/sample/page-sample-make-his', data).then(res => res),
  pageSampleReceive: data =>
    http.post('/v1/sample/page-sample-receive', data).then(res => res),
  pageSampleFlow: data =>
    http.post('/v1/sample/page-sample-flow', data).then(res => res),
  pageSampleFlowHis: data =>
    http.post('/v1/sample/page-sample-flow-his', data).then(res => res),
  pageSampleReceiveHis: data =>
    http.post('/v1/sample/page-sample-receive-his', data).then(res => res),

  pageSampleSend: data =>
    http.post('/v1/sample/page-sample-send', data).then(res => res),

  pageSampleWaitTest: data =>
    http.post('/v1/sample/page-sample-wait-test', data).then(res => res),

  pageSampleSendHis: data =>
    http.post('/v1/sample/page-sample-send-his', data).then(res => res),

  pageSampleAllocate: data =>
    http.post('/v1/sample/page-sample-allocate', data).then(res => res),

  pageSampleDispatch: data =>
    http.post('/v1/sample/page-sample-dispatch', data).then(res => res),

  pageSampleInput: data =>
    http.post('/v1/sample/page-sample-input', data).then(res => res),

  pageSampleInputEnv: data =>
    http.post('/v1/sample/page-sample-input-env', data).then(res => res),

  pageSampleCheck: data =>
    http.post('/v1/sample/page-sample-check', data).then(res => res),

  pageSampleCheckEnv: data =>
    http.post('/v1/sample/page-sample-check-env', data).then(res => res),

  pageSampleAudit: data =>
    http.post('/v1/sample/page-sample-audit', data).then(res => res),

  pageSampleAuditEnv: data =>
    http.post('/v1/sample/page-sample-audit-env', data).then(res => res),
  pageReportMake: data =>
    http.post('/v1/sample/page-report-make', data).then(res => res),

  pageReportMakeHis: data =>
    http.post('/v1/sample/page-report-make-his', data).then(res => res),

  pageReportMakeEnv: data =>
    http.post('/v1/sample/page-report-make-env', data).then(res => res),

  pageReportMakeEnvHis: data =>
    http.post('/v1/sample/page-report-make-env-his', data).then(res => res),

  pageReportCheckHis: data =>
    http.post('/v1/sample/page-report-check-his', data).then(res => res),

  pageReportCheckEnvHis: data =>
    http.post('/v1/sample/page-report-check-env-his', data).then(res => res),

  pageReportIssueHis: data =>
    http.post('/v1/sample/page-report-issue-his', data).then(res => res),

  pageReportIssueEnvHis: data =>
    http.post('/v1/sample/page-report-issue-env-his', data).then(res => res),

  pageReportCheck: data =>
    http.post('/v1/sample/page-report-check', data).then(res => res),

  pageReportCheckEnv: data =>
    http.post('/v1/sample/page-report-check-env', data).then(res => res),

  pageReportIssue: data =>
    http.post('/v1/sample/page-report-issue', data).then(res => res),

  pageReportIssueEnv: data =>
    http.post('/v1/sample/page-report-issue-env', data).then(res => res),
  pageReportConsult: data =>
    http.post('/v1/sample/page-report-consult', data).then(res => res),

  getById: id => http.get('/v1/test_catalogue/' + id).then(res => res),
  getSampleVO: id =>
    http.post('/v1/sample/get-sample-vo/' + id).then(res => res),
  edit: data => http.put('/v1/sample?id=' + data.id, data.obj).then(res => res),
  editSampleVO: data =>
    https
      .post('/v1/sample/sample_vo/edit', JSON.stringify(data.obj))
      .then(res => res),

  add: data => http.post('/v1/sample/', data).then(res => res),
  addMaterialRegister: data =>
    https
      .post('/v1/sample/add-material-register', JSON.stringify(data))
      .then(res => res),

  addEnvRegister: data =>
    http.post('/v1/sample/add-env-register', data).then(res => res),

  submitRegister: data =>
    http.post('/v1/sample/submit-register?ids=' + data).then(res => res),
  submitSend: data =>
    http.post('/v1/sample/submit-send?ids=' + data).then(res => res),
  submitReceive: data =>
    http.post('/v1/sample/submit-receive-to-flow?ids=' + data).then(res => res),

  scanSampleSend: data =>
    http
      .post('/v1/sample/scan-submit-send?sampleCode=' + data)
      .then(res => res),
  scanSubmitReceive: data =>
    http
      .post('/v1/sample/scan-submit-receive?sampleCode=' + data)
      .then(res => res),

  submitReportMake: data =>
    http.post('/v1/sample/submit-report-make?ids=' + data).then(res => res),

  submitReportMakeEnv: data =>
    http.post('/v1/sample/submit-report-make-env?ids=' + data).then(res => res),

  submitReportCheck: data =>
    http.post('/v1/sample/submit-report-check?ids=' + data).then(res => res),

  submitReportCheckEnv: data =>
    http
      .post('/v1/sample/submit-report-check-env?ids=' + data)
      .then(res => res),

  submitReportIssue: data =>
    http.post('/v1/sample/submit-report-issue?ids=' + data).then(res => res),

  submitReportIssueEnv: data =>
    http
      .post('/v1/sample/submit-report-issue-env?ids=' + data)
      .then(res => res),

  submitEnvPlan: data =>
    http.post('/v1/sample/submit-env-plan?ids=' + data).then(res => res),

  submitEnvPlanCheck: data =>
    http.post('/v1/sample/submit-env-plan-check?ids=' + data).then(res => res),

  submitEnvPlanExecute: data =>
    http.post('/v1/sample/submit-env-execute?ids=' + data).then(res => res),

  stopTest: data =>
    http.post('/v1/sample/stop-test?ids=' + data).then(res => res),
  backEnvPlanCheck: data =>
    http
      .post('/v1/sample/back-env-plan-check?ids=' + data.ids, data)
      .then(res => res),
  backOosCheck: data =>
    http
      .post('/v1/sample/back-oos-check?ids=' + data.ids, data)
      .then(res => res),

  reportGenerate: data =>
    https
      .post('/v1/sample/report_generate', JSON.stringify(data))
      .then(res => res),

  pageSampleOosReg: data =>
    http.post('/v1/sample/page-oos-register', data).then(res => res),

  pageSampleOosRegHis: data =>
    http.post('/v1/sample/page-oos-register-his', data).then(res => res),
  pageSampleOosCheck: data =>
    http.post('/v1/sample/page-oos-check', data).then(res => res),

  pageSampleOosExecute: data =>
    http.post('/v1/sample/page-oos-execute', data).then(res => res),

  pageSampleOosExecuteHis: data =>
    http.post('/v1/sample/page-oos-execute-his', data).then(res => res),

  submitOosCheck: data =>
    http.post('/v1/sample/submit-oos-check?ids=' + data).then(res => res),

  submitOosExecute: data =>
    http.post('/v1/sample/submit-oos-execute?ids=' + data).then(res => res),
  // OOS
  registerSuggestion: data =>
    http.post('/v1/sample_oos/register-suggestion', data).then(res => res),

  submitOosRegister: data =>
    http
      .post('/v1/sample_oos/submit_oos_register?ids=' + data)
      .then(res => res),
  submitFlow: data =>
    https.post('/v1/sample/submit-flow', JSON.stringify(data)).then(res => res),
  pageSampleDataQuery: data =>
    http.post('/v1/sample/page-sample-data-query', data).then(res => res)
}
