destinationFlight.js 2.14 KB
import request from '@/utils/request'

//目的航班规则接口

// 查询航班列表
export function findFlightNo(query) {
  return request({
    url: '/destinationFlight/findFlightNo',
    method: 'post',
    data: query
  })
}

// id查询目的航班
export function findByFlightId(id) {
  const data = {
    id
  }
  return request({
    url: '/destinationFlight/findByFlightId',
    method: 'post',
    data: data
  })
}

//航班号查航班
export function findDestinationFltRuleByActualFlight(actualFlight){
  const data = {
    actualFlight
  }
  return request({
    url:'/sourceFlight/findDestinationFltRuleByActualFlight',
    method:'post',
    data:data
  })
}


export function updateOrAddFlight(form){
  //处理数据
  form.typeOfGoods = form.typeOfGoods.join(';');
  form.declarationCategory = form.declarationCategory.join(';');
  form.serviceCode = form.serviceCode.join(';');
  form.subCategory = form.subCategory.join(';');

  return request({
    url:'/destinationFlight/updateOrAddFlight',
    method: 'post',
    data:form
  })
}

//删除规则
export function delFlightId(id){
  const data = {
    id
  }
  return request({
    url: '/destinationFlight/delFlightId',
    method: 'post',
    data: data
  })
}

//启用/停止规则
export function enableOrDisable(id, status){
  //statsu 1-有效 3-停用
  const data = {
    id,
    status
  }
  return request({
    url: '/destinationFlight/enableOrDisable',
    method: 'post',
    data: data
  })
}


//申报类别
export function cargoTypeData(){
  return request({
    url: '/destinationFlight/cargoTypeData',
    method: 'post'
  })
}

//货物类型
export function cargoStatusData(){
  return request({
    url: '/destinationFlight/cargoStatusData',
    method: 'post'
  })
}

//ServiceCode
export function serviceCodeData(){
  return request({
    url: '/destinationFlight/serviceCodeData',
    method: 'post'
  })
}

//SubCategory
export function subCategoryData(){
  return request({
    url: '/destinationFlight/subCategoryData',
    method: 'post'
  })
}

//获取全部字典
export function allDictData(){
  return request({
    url: '/destinationFlight/allDictData',
    method: 'post'
  })
}