import { transaction, dict, FileApi } from '@/api'
import request from '@/utils/require'

//列表页
export function selectTransactionSignUpPageList(data) {
  return request({
    url: `${transaction}/transactionsignup/selectTransactionSignUpPageList?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'post',
    data: data
  })
}
//新增
export function insertTransactionSignUp(data) {
  return request({
    url: `${transaction}/transactionsignup/insertTransactionSignUp`,
    method: 'post',
    data: data
  })
}

//查看
export function selectTransactionSignUpDetail(data) {
  return request({
    url: `${transaction}/transactionsignup/selectTransactionSignUpDetail`,
    method: 'post',
    data: data
  })
}

//修改保存
export function updateTransactionSignUp(data) {
  return request({
    url: `${transaction}/transactionsignup/updateTransactionSignUp`,
    method: 'post',
    data: data
  })
}

//删除
export function deleteTransactionSignUp(data) {
  return request({
    url: `${transaction}/transactionsignup/deleteTransactionSignUp`,
    method: 'post',
    data: data
  })
}

//
export function selectSceneList(data) {
  return request({
    url: `${transaction}/transactionsignup/selectSceneList`,
    method: 'post',
    data: data
  })
}

//字典
export function findByGroupId(pdictCode) {
  return request({
    url: `${dict}/dataDictionary/findByGroupId/${pdictCode}`,
    method: 'get'
  })
}

//手续费
export function selectFeeRateDetail(data) {
  return request({
    url: `${transaction}/feerate/selectFeeRateDetail`,
    method: 'post',
    data: data
  })
}
//上传
export function uploadFn(param) {
  return requestFile({
    url: `${FileApi}/file/upload`,
    method: 'post',
    data: param
  })
}

////文件回显
export function fileInfo(data) {
  return request({
    url: `${FileApi}/file/findByIds?ids=${data}`,
    method: 'get'
  })
}

//批量提交
export function batchSubmitTransactionSignUp(data) {
  return request({
    url: `${transaction}/transactionsignup/batchSubmitTransactionSignUp`,
    method: 'post',
    data: data
  })
}

// 企业是否违规, 可报名状态查询
export function valiTurn() {
  return request({
    url: `${transaction}/transactionsignup/valiTurn?dwbm=${sessionStorage.orgCode}`,
    method: 'post',
  })
}


//查询场次对应的标的下拉列表
export function selectTradeByCcbm(ccbm) {
  return request({
    url: `${transaction}/trademark/selectTradeByCcbm/${ccbm}`,
    method: 'post',
  })
}

//列表页
export function selectTranPageList(data) {
  return request({
    url: `${transaction}/transactionsignup/selectTranPageList?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
    method: 'post',
    data: data
  })
}

// //查询场次对应的标的下拉列表
// export function selectTradeByCcbm(ccbm) {
//   return request({
//     url: `${transaction}/trademark/selectTradeByCcbm/${ccbm}`,
//     method: 'post',
//   })
// }

//不分页列表
export function selectTransactionSignUp(data) {
  return request({
    url: `${transaction}/transactionsignup/selectTransactionSignUp`,
    method: 'post',
    data: data
  })
}

