import { axios } from "@/utils/request";
import request from '@/utils/request'
import qs from "qs";
import { UPCLOUD_RDC_TMS_MAINDATA_SERVICE } from '@/config/serviceSettings.js'
const serviceName = UPCLOUD_RDC_TMS_MAINDATA_SERVICE

// 主表地址
export const listRemoteUrl = {
  url: serviceName + "/sysimport/templet/listPage",
  method: "post"
};

// 启用停用
export const updateStatus = data => {
  return request({
    url: serviceName + '/sysimport/templet/enable/' + data.id + '/' + data.status,
    method: 'get',
  })
};

// 删除
export const Delete = data => {
  return request({
    url: serviceName + '/sysimport/templet/delete',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data: qs.stringify(data),
  })
};

// 新增
export const Add = data => {
  return request({
    url: serviceName + '/sysimport/templet/add',
    method: 'post',
    data,
  })
};

// 修改
export const Update = data => {
  return request({
    url: serviceName + '/sysimport/templet/update',
    method: 'post',
    data,
  })
};

// 获取不同导入对象对应的明细列表
export const stdfeildList = data => {
  return request({
    url: serviceName + '/sysimport/stdfeild/list/' + data,
    method: 'get',
  })
};

// 查询模板明细列表
export const queryHd = data => {
  return request({
    url: serviceName + '/sysimport/templet/queryHd/' + data,
    method: 'get',
  })
};
