import request from '@/utils/request'
import state from '@/store'
import router from '@/router'

// 初始化机床项目
export function initProject() {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: 'PDM_项目名称_查询数据'
    }
  })
}
// PDM_机床名称_发货状态_查询数据
export function selecttable(check2, machineNumberValue) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: 'PDM_机床名称_发货状态_查询数据',
      param: '机床流水号_check=' + check2 + '&机床流水号=' + machineNumberValue
    }
  })
}
// PDM_机床名称_发货状态_编辑数据
export function updatestate(machineNumberValue, state, attention) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: 'PDM_机床名称_发货审批_编辑数据',
      param: '机床流水号=' + machineNumberValue + '&发货状态=' + state + '&注意事项=' + attention
    }
  })
}

