/*
 * @Descripttion: 
 * @version: 
 * @Author: 王三华
 * @Date: 2023-11-28 13:51:19
 */
import request from '@/utils/request'

//查询公司
export function corpList(params) {
  return request({
    url: '/system/manage/corp/list',
    method: 'get',
    params
  })
}
//查询公司
export function refList(params) {
  return request({
    url: '/system/manage/corp/ref',
    method: 'get',
    params
  })
}

//新增保存公司
export function corpSave(data) {
  return request({
    url: '/system/manage/corp/save',
    method: 'post',
    data
  })
}
//批次下拉
export function batchRefer(data) {
  return request({
    url: '/scm/manage/batch-code/refer',
    method: 'post',
    data
  })
}




//删除公司
export function deleteMemberTeam(pkId) {
  return request({
    url: '/system/manage/corp/' + pkId,
    method: 'delete',
  })
}
//查询供应商
export function supplierList(params) {
  return request({
    url: '/system/manage/cus/list-supplier',
    method: 'get',
    params
  })
}
//查询供应商1
export function supplierProduct(params) {
  return request({
    url: '/system/manage/cus/list-supplierProduct',
    method: 'get',
    params
  })
}

//供应商类型
export function getCustTypeList(params) {
  return request({
    url: '/system/pub/enums/supply-type',
    method: 'get',
    params
  })
}
//供应商管理列表
export function getSupplierList(params) {
  return request({
    url: '/system/manage/cus/list',
    method: 'get',
    params
  })
}



//删除供应商
export function deleteSupplier(pkId) {
  return request({
    url: '/system/manage/cus/' + pkId,
    method: 'delete',
  })
}

// 新增供应商
export function addSupplier(data) {
  return request({
    url: '/system/manage/cus/save',
    method: 'post',
    data
  })
}

//查询采购订单
export function poList(data) {
  return request({
    url: '/scm/manage/po/list',
    method: 'post',
    data
  })
}
//查询采购入库
export function purchaseList(data) {
  return request({
    url: '/scm/manage/purchase/list',
    method: 'post',
    data
  })
}
//新增采购订单
export function insertPoList(data) {
  return request({
    url: '/scm/manage/po/insert',
    method: 'post',
    data
  })
}
//编辑采购订单
export function updatePoList(data) {
  return request({
    url: '/scm/manage/po/update',
    method: 'post',
    data
  })
}
//查询采购订单详情
export function poListDetail(params) {
  return request({
    url: '/scm/manage/po/list-detail/' + params,
    method: 'get',
  })
}
//采购订单删除
export function poDel(params) {
  return request({
    url: '/scm/manage/po/' + params,
    method: 'delete',
  })
}
//采购入库单删除
export function purchaseDel(params) {
  return request({
    url: '/scm/manage/purchase/' + params,
    method: 'delete',
  })
}
//调拨入库单删除
export function transInDel(params) {
  return request({
    url: '/scm/manage/trans-in/' + params,
    method: 'delete',
  })
}
//删除调拨订单
export function transDel(params) {
  return request({
    url: '/scm/manage/trans-order/' + params,
    method: 'delete',
  })
}
//删除调拨出库单
export function transOutDel(params) {
  return request({
    url: '/scm/manage/trans-out/' + params,
    method: 'delete',
  })
}
// 产品基本信息
export function productFind(params) {
  return request({
    url: 'scm/manage/product-bas/find-all',
    method: 'get',
    params
  })
}
//产品基本信息2(只有已关联的)
export function productFindList(params) {
  return request({
    url: 'scm/manage/product-bas/query-product-bas-relevance',
    method: 'get',
    params
  })
}
// 产品基本信息详情
export function productFindInfo(params) {
  return request({
    url: 'scm/manage/product-bas/get-product-info',
    method: 'get',
    params
  })
}
// 调拨方式
export function transferType(params) {
  return request({
    url: '/system/pub/enums/transfer-type',
    method: 'get',
    params
  })
}
//是否接口
export function getEYesNoList(params) {
  return request({
    url: '/system/pub/enums/dealer-yes-no',
    method: 'get',
    params
  })
}
//查询采购订单
export function purchaseOrderList(data) {
  return request({
    url: '/scm/manage/purchase/list',
    method: 'post',
    data
  })
}
//查询待入库的采购订单
export function storeList(data) {
  return request({
    url: '/scm/manage/po/store-list',
    method: 'post',
    data
  })
}
//待入库的采购订单参照
export function purchaseInsert(data) {
  return request({
    url: '/scm/manage/purchase/insert',
    method: 'post',
    data
  })
}
//待入库的采购订单参照修改
export function purchaseUpdate(data) {
  return request({
    url: '/scm/manage/purchase/update',
    method: 'post',
    data
  })
}
//查询调拨订单
export function transList(data) {
  return request({
    url: '/scm/manage/trans-order/list',
    method: 'post',
    data
  })
}
//查询调拨订单详情
export function transListDetail(params) {
  return request({
    url: '/scm/manage/trans-order/trans-list-detail/' + params,
    method: 'get',
  })
}
//新增调拨订单
export function insertTrans(data) {
  return request({
    url: '/scm/manage/trans-order/insert',
    method: 'post',
    data
  })
}
//修改调拨订单
export function updateTrans(data) {
  return request({
    url: '/scm/manage/trans-order/update',
    method: 'post',
    data
  })
}
//调拨入库单查询
export function generalList(data) {
  return request({
    url: '/scm/manage/trans-in/list',
    method: 'post',
    data
  })
}
//调拨入库参照查询
export function transInList(data) {
  return request({
    url: '/scm/manage/trans-out/trans-out-list',
    method: 'post',
    data
  })
}
//调拨出库单查询
export function generalOutList(data) {
  return request({
    url: '/scm/manage/trans-out/list',
    method: 'post',
    data
  })
}
//查询待出库的调拨订单
export function transOutList(data) {
  return request({
    url: '/scm/manage/trans-order/trans-list',
    method: 'post',
    data
  })
}
//调拨出库单新增保存
export function insertTransOut(data) {
  return request({
    url: '/scm/manage/trans-out/insert',
    method: 'post',
    data
  })
}
//调拨出库单修改保存
export function updateTransOut(data) {
  return request({
    url: '/scm/manage/trans-out/update',
    method: 'post',
    data
  })
}
//调拨入库单新增保存
export function insertTransIn(data) {
  return request({
    url: '/scm/manage/trans-in/insert',
    method: 'post',
    data
  })
}
//调拨入库单修改保存
export function updateTransIn(data) {
  return request({
    url: '/scm/manage/trans-in/update',
    method: 'post',
    data
  })
}
// 国家
export function getcountryAllList(params) {
  return request({
    url: '/system/manage/country/find-all',
    method: 'get',
    params
  })
}

//仓库
export function getStoreRefer(params) {
  return request({
    url: '/system/manage/storehouse/refer',
    method: 'get',
    params
  })
}

//查询可用量列表
export function getAvailableList(data) {
  return request({
    url: '/scm/manage/available/list?pageNum=' + data.pageNum + "&pageSize=" + data.pageSize,
    method: 'post',
    data
  })
}

//修改可用量
export function updateAvailableList(data) {
  return request({
    url: '/scm/manage/available/update',
    method: 'post',
    data
  })
}


//查询现存量列表
export function getHandnumList(data) {
  return request({
    url: '/scm/manage/hand-num/list?pageNum=' + data.pageNum + "&pageSize=" + data.pageSize,
    method: 'post',
    data
  })
}


//其他入库单列表
export function getGemmeralinList(data) {
  return request({
    url: '/scm/manage/general-in/list',
    method: 'post',
    data
  })
}
//其他入库单列表详情
export function geListDetail(params) {
  return request({
    url: '/scm/manage/general-in/list-detail/' + params,
    method: 'get',
  })
}
//其他入库单删除
export function generalInDel(params) {
  return request({
    url: '/scm/manage/general-in/' + params,
    method: 'delete',
  })
}

//其他入库新增
export function addGeneralinInsert(data) {
  return request({
    url: '/scm/manage/general-in/insert',
    method: 'post',
    data
  })
}

//其他入库修改
export function updateGeneralin(data) {
  return request({
    url: '/scm/manage/general-in/update',
    method: 'post',
    data
  })
}

//其他入库单明细
export function getGeneralinDetailList(params) {
  return request({
    url: '/scm/manage/general-in/list-detail/' + params,
    method: 'get',
  })
}
//库存盘点单查询
export function inventoryList(data) {
  return request({
    url: '/scm/manage/inventory/list',
    method: 'post',
    data
  })
}


//查询可用量
export function handNumList(data) {
  return request({
    url: '/scm/manage/hand-num/list',
    method: 'post',
    data
  })
}

//库存盘点新增
export function inventoryAdd(data) {
  return request({
    url: '/scm/manage/inventory/insert',
    method: 'post',
    data
  })
}
//库存盘点修改
export function inventoryUpdate(data) {
  return request({
    url: '/scm/manage/inventory/update',
    method: 'post',
    data
  })
}
//删除库存盘点
export function inventoryDel(params) {
  return request({
    url: '/scm/manage/inventory/' + params,
    method: 'delete',
  })
}
//盘点类型
export function inventoryType(params) {
  return request({
    url: '/system/pub/enums/inventory-type',
    method: 'get',
    params
  })
}
//库存盘点单查询详情
export function inventoryDetail(params) {
  return request({
    url: '/scm/manage/inventory/list-detail/' + params,
    method: 'get',
  })
}

//其他出库单删除
export function deletGeneralOut(params) {
  return request({
    url: '/scm/manage/general-out/' + params,
    method: 'delete',
  })
}

//其他出库单列表
export function getGeneralOutList(data) {
  return request({
    url: '/scm/manage/general-out/list',
    method: 'post',
    data
  })
}

//其他出库单明细
export function getGeneraloutDetailList(params) {
  return request({
    url: '/scm/manage/general-out/list-detail/' + params,
    method: 'get',
  })
}

//其他出库新增
export function addGeneraloutInsert(data) {
  return request({
    url: '/scm/manage/general-out/insert',
    method: 'post',
    data
  })
}

//其他出库修改
export function updateGeneralout(data) {
  return request({
    url: '/scm/manage/general-out/update',
    method: 'post',
    data
  })
}

//查询批次号管理列表
export function getBatchCodeList(data) {
  return request({
    url: '/scm/manage/batch-code/list?pageNum=' + data.pageNum + "&pageSize=" + data.pageSize,
    method: 'post',
    data
  })
}

//新增批次号
export function insertBatchCode(data) {
  return request({
    url: '/scm/manage/batch-code/insert',
    method: 'post',
    data
  })
}

//修改批次号
export function updateBatchCode(data) {
  return request({
    url: '/scm/manage/batch-code/update',
    method: 'post',
    data
  })
}

// 删除批次号
export function deleteBatchNumber(pkId) {
  return request({
    url: '/scm/manage/batch-code/' + pkId,
    method: 'delete',
  })
}



//销售出库
export function saleOut(data) {
  return request({
    url: '/scm/manage/sale-out/list',
    method: 'post',
    data
  })
}
//销售退货
export function saleOutBack(data) {
  return request({
    url: '/scm/manage/sale-out/back',
    method: 'post',
    data
  })
}
//采购退货
export function purOutBack(data) {
  return request({
    url: '/scm/manage/purchase/out-back',
    method: 'post',
    data
  })
}
//销售退货单
export function saleOutBackList(data) {
  return request({
    url: '/scm/manage/sale-out/list-back',
    method: 'post',
    data
  })
}
//查询采购退货单
export function purchaseOut(data) {
  return request({
    url: '/scm/manage/purchase/list-out',
    method: 'post',
    data
  })
}
//订单状态
export function getOrderStatus(params) {
  return request({
    url: '/system/pub/enums/scm-order-status',
    method: 'get',
    params
  })
}

//供应商申请列表
export function getSupplierApplyList(params) {
  return request({
    url: '/scm/manage/th-supplier-apply/list',
    method: 'get',
    params
  })
}

//供应商申请删除
export function deleteSupplierApply(pkId) {
  return request({
    url: '/scm/manage/th-supplier-apply/' + pkId,
    method: 'delete',
  })
}

//供应商申请-结算方式枚举
export function getSettleType(params) {
  return request({
    url: '/system/pub/enums/settle-Type',
    method: 'get',
    params
  })
}

//添加供应商申请
export function addThSupplierApply(data) {
  return request({
    url: '/scm/manage/th-supplier-apply/save',
    method: 'post',
    data
  })
}

//修改供应商申请
export function updateThSupplierApply(data) {
  return request({
    url: '/scm/manage/th-supplier-apply/update',
    method: 'post',
    data
  })
}

//供应商申请发起签呈
export function petitionSupplierApply(data) {
  return request({
    url: '/scm/manage/th-supplier-apply/petition',
    method: 'post',
    data
  })
}


//供应商申请获取单条详情
export function getOneThsupplierApply(pkId) {
  return request({
    url: '/scm/manage/th-supplier-apply/getOne/' + pkId,
    method: 'get',
  })
}

//保证金缴纳列表
export function getThMarginList(params) {
  return request({
    url: '/scm/manage/th-margin/list',
    method: 'get',
    params
  })
}

//删除保证金缴纳单条
export function deleteThMargin(pkId) {
  return request({
    url: '/scm/manage/th-margin/' + pkId,
    method: 'delete',
  })
}

//添加保证金缴纳
export function addThMargin(data) {
  return request({
    url: '/scm/manage/th-margin/save',
    method: 'post',
    data
  })
}

//修改保证金缴纳
export function updateThMargin(data) {
  return request({
    url: '/scm/manage/th-margin/update',
    method: 'post',
    data
  })
}

//保证金缴纳发起签呈
export function petitionThMargin(data) {
  return request({
    url: '/scm/manage/th-margin/petition',
    method: 'post',
    data
  })
}


//保证金缴纳获取单条详情
export function getOneThMargin(pkId) {
  return request({
    url: '/scm/manage/th-margin/getOne/' + pkId,
    method: 'get',
  })
}

//保证金缴纳-销售类型
export function getOrderType(params) {
  return request({
    url: '/system/pub/enums/sale-type',
    method: 'get',
    params
  })
}

//保证金缴纳-销售范围
export function getSaleScopeList(params) {
  return request({
    url: '/sale/manage/area-classify/get-hierarchy-list',
    method: 'get',
    params
  })
}


//查询预警配置
export function warnList(data) {
  return request({
    url: '/scm/manage/warn/list',
    method: 'post',
    data
  })
}
//预警配置新增
export function warnAdd(data) {
  return request({
    url: '/scm/manage/warn/insert',
    method: 'post',
    data
  })
}
//预警配置修改
export function warnUp(data) {
  return request({
    url: '/scm/manage/warn/update',
    method: 'post',
    data
  })
}

//删除预警配置
export function warnDel(params) {
  return request({
    url: '/scm/manage/warn/' + params,
    method: 'delete',
  })
}

//中台-订单查询
export function getSupplierOrderInquiry(data) {
  return request({
    url: '/scm/manage/order/list?pageNum=' + data.pageNum + "&pageSize=" + data.pageSize,
    method: 'post',
    data
  })
}

//中台-订单查询发货
export function manageOrderSend(data) {
  return request({
    url: '/scm/manage/order/send',
    method: 'post',
    data
  })
}

//中台-订单结算
export function getSupplierOrderSettlement(data) {
  return request({
    url: '/scm/manage/order/list-settle?pageNum=' + data.pageNum + "&pageSize=" + data.pageSize,
    method: 'post',
    data
  })
}

//中台-订单结算 结算
export function manageOrderSettleOrder(data) {
  return request({
    url: '/scm/manage/order/settle-order',
    method: 'post',
    data
  })
}
//用途配置列表
export function bdPurposeList(params) {
  return request({
    url: '/system/manage/bd-purpose/list',
    method: 'get',
    params
  })
}
//用途配置新增
export function bdPurposeSave(data) {
  return request({
    url: '/system/manage/bd-purpose/save',
    method: 'post',
    data
  })
}
//用途配置修改
export function bdPurposeUpdate(data) {
  return request({
    url: '/system/manage/bd-purpose/update',
    method: 'post',
    data
  })
}
//用途配置详情
export function bdPurposeDetails(params) {
  return request({
    url: '/system/manage/bd-purpose/getOne/' + params,
    method: 'get',
  })
}
//用途配置删除
export function bdPurposeDel(params) {
  return request({
    url: '/system/manage/bd-purpose/' + params,
    method: 'delete',
  })
}
//地址
export function areaList(params) {
  return request({
    url: '/system/manage/area/find-all',
    method: 'get',
    params
  })
}
//根据供应商查询供应商产品
export function getSupplierProduct(params) {
  return request({
    url: 'scm/manage/product-bas/get-supplier-product',
    method: 'get',
    params
  })
}
//用途下拉
export function purposeAllList(params) {
  return request({
    url: '/system/manage/bd-purpose/allList',
    method: 'get',
    params
  })
}
//业务领用列表
export function ioList(data) {
  return request({
    url: '/scm/manage/io/list',
    method: 'post',
    data
  })
}
//业务领用列表明细
export function ioListDetails(params) {
  return request({
    url: '/scm/manage/io/list-detail/' + params,
    method: 'get',
  })
}
//业务领用新增
export function ioInsert(data) {
  return request({
    url: '/scm/manage/io/insert',
    method: 'post',
    data
  })
}
//业务领用修改
export function ioUpdate(data) {
  return request({
    url: '/scm/manage/io/update',
    method: 'post',
    data
  })
}
//业务领用删除
export function ioDel(params) {
  return request({
    url: '/scm/manage/io/' + params,
    method: 'delete',
  })
}
//供应商邮费列表
export function postageList(params) {
  return request({
    url: 'scm/manage/supplier-postage/list',
    method: 'get',
    params
  })
}
//供应商邮费列表新增
export function postageSave(data) {
  return request({
    url: 'scm/manage/supplier-postage/save',
    method: 'post',
    data
  })
}
//供应商邮费列表修改
export function postageUpdate(data) {
  return request({
    url: 'scm/manage/supplier-postage/update',
    method: 'post',
    data
  })
}
//供应商邮费详情
export function postageDetails(params) {
  return request({
    url: 'scm/manage/supplier-postage/detail',
    method: 'get',
    params
  })
}
//供应商邮费删除
export function postageRemove(params) {
  return request({
    url: 'scm/manage/supplier-postage/remove',
    method: 'get',
    params
  })
}
//供应商产品统计
export function supplierProductList(params) {
  return request({
    url: 'sale/manage/product/supplier-product-census',
    method: 'get',
    params
  })
}
//统计分析=销售退货列表
export function saleListOut(data) {
  return request({
    url: 'scm/manage/sale-out/list-back',
    method: 'post',
    data
  })
}
//统计分析=采购退货列表
export function purchaseListOut(data) {
  return request({
    url: 'scm/manage/purchase/list-out',
    method: 'post',
    data
  })
}
//发货日志列表
export function saleOutList(data) {
  return request({
    url: '/scm/manage/sale-out/list-again',
    method: 'post',
    data
  })
}
//发货日志发货
export function saleOutSend(data) {
  return request({
    url: '/scm/manage/sale-out/again-send',
    method: 'post',
    data
  })
}