/*
 * @Descripttion:
 * @version:
 * @Author: kBank
 * @Date: 2022-10-28 10:33:35
 */
import request from '@/utils/request'
// 查询所有规格
export function findAll() {
  return request({
    url: '/sale/manage/specsType/find-all',
    method: 'get'
  })
}
// 查询所有规格jxc
export function findAllJxc() {
  return request({
    url: 'scm/manage/product-bas/find-all',
    method: 'get'
  })
}
// 产品属性枚举
export function productType() {
  return request({
    url: '/system/pub/enums/get-product-attr-type',
    method: 'get'
  })
}
// 发货类型
export function getShipping() {
  return request({
    url: '/system/pub/enums/get-shipping-channel',
    method: 'get'
  })
}
// 单位
export function getUnit() {
  return request({
    url: '/system/pub/enums/get-unit',
    method: 'get'
  })
}
// 销售模式
export function saleModel() {
  return request({
    url: 'system/pub/enums/sale-model',
    method: 'get'
  })
}
// 所属分类
export function classifyAll() {
  return request({
    url: '/sale/manage/classify/find-all',
    method: 'get'
  })
}
// 运输方式
export function transportType() {
  return request({
    url: '/system/pub/enums/manager-transport-type',
    method: 'get'
  })
}
// 产品新增
export function productSave(data) {
  return request({
    url: '/sale/manage/product/save',
    method: 'post',
    data
  })
}
// 产品新增jxc
export function productSaveJxc(data) {
  return request({
    url: 'scm/manage/product-bas/save',
    method: 'post',
    data
  })
}
// 推荐不推荐
export function classifyRecommend(data) {
  return request({
    url: '/sale/manage/area-classify/classify-recommend',
    method: 'post',
    data
  })
}
// 产品编辑
export function productUpdate(data) {
  return request({
    url: '/sale/manage/product/update',
    method: 'post',
    data
  })
}
// 产品编辑Jxc
export function productUpdateJxc(data) {
  return request({
    url: 'scm/manage/product-bas/update',
    method: 'post',
    data
  })
}
// 商品审核
export function productWaresApprove(data) {
  return request({
    url: 'sale/manage/wares/wares-approve',
    method: 'post',
    data
  })
}
// 产品列表
export function productList(params) {
  return request({
    url: '/sale/manage/product/list',
    method: 'get',
    params
  })
}
// 产品列表Jxc
export function productListJxc(params) {
  return request({
    url: 'scm/manage/product-bas/list',
    method: 'get',
    params
  })
}
// 删除产品
export function productDel(id) {
  return request({
    url: '/sale/manage/product/' + id,
    method: 'delete'
  })
}
// 删除产品jxc
export function productDelJxc(id) {
  return request({
    url: 'scm/manage/product-bas/' + id,
    method: 'delete'
  })
}
// 产品详情
export function productDetailt(params) {
  return request({
    url: '/sale/manage/product/detail',
    method: 'get',
    params
  })
}
// 产品详情
export function productDetailBas(params) {
  return request({
    url: '/sale/manage/product/product-bas-detail',
    method: 'get',
    params
  })
}
// 产品详情jxc
export function productDetailtJxc(params) {
  return request({
    url: 'scm/manage/product-bas/detail',
    method: 'get',
    params
  })
}
// 产品上移下移
export function productMove(params) {
  return request({
    url: '/sale/manage/product/move',
    method: 'get',
    params
  })
}
// 产品置顶
export function floatingFoof(params) {
  return request({
    url: '/sale/manage/product/floating-roof',
    method: 'get',
    params
  })
}
// 产品分类列表
export function classifyList(params) {
  return request({
    url: '/sale/manage/classify/list',
    method: 'get',
    params
  })
}
// 产品分类详情
export function classifyDetail(params) {
  return request({
    url: '/sale/manage/classify/detail',
    method: 'get',
    params
  })
}
// 产品分类新增
export function classifySave(data) {
  return request({
    url: '/sale/manage/classify/save',
    method: 'post',
    data
  })
}
// 产品分类编辑
export function classifyUpdate(data) {
  return request({
    url: '/sale/manage/classify/update',
    method: 'post',
    data
  })
}
// 删除产品分类
export function classifyDel(id) {
  return request({
    url: '/sale/manage/classify/' + id,
    method: 'delete'
  })
}
// 规格类型列表
export function specsTypeList(params) {
  return request({
    url: '/sale/manage/specsType/list',
    method: 'get',
    params
  })
}
// 规格类型详情
export function specsTypeDetail(params) {
  return request({
    url: '/sale/manage/specsType/detail',
    method: 'get',
    params
  })
}
// 规格类型新增
export function specsTypeSave(data) {
  return request({
    url: '/sale/manage/specsType/save',
    method: 'post',
    data
  })
}
// 规格类型编辑
export function specsTypeUpdate(data) {
  return request({
    url: '/sale/manage/specsType/update',
    method: 'post',
    data
  })
}
// 删除规格类型
export function specsTypeDel(id) {
  return request({
    url: '/sale/manage/specsType/' + id,
    method: 'delete'
  })
}
// 导出产品分类
export function exportClassIfy(params) {
  return request({
    url: '/sale/manage/classify/export',
    method: 'post',
    params
  })
}
// 导出撤单列表
export function removeOrderList(params) {
  return request({
    url: '/sale/manage/order-charge-log/export',
    method: 'get',
    params
  })
}
// 商品分类列表
export function areaClassIfyList(params) {
  return request({
    url: '/sale/manage/area-classify/list',
    method: 'get',
    params
  })
}
// 删除商品分类
export function areaClassifyDel(id) {
  return request({
    url: '/sale/manage/area-classify/' + id,
    method: 'delete'
  })
}

// 新增商品分类
export function areaClassifySave(data) {
  return request({
    url: '/sale/manage/area-classify/save',
    method: 'post',
    data
  })
}
// 编辑商品分类
export function areaClassifyUpdate(data) {
  return request({
    url: '/sale/manage/area-classify/update',
    method: 'post',
    data
  })
}
// 商品分类详情
export function areaClassifyDetail(params) {
  return request({
    url: '/sale/manage/area-classify/detail',
    method: 'get',
    params
  })
}
// 商品所属分类
export function getAreaClassify(params) {
  return request({
    url: '/sale/manage/area-classify/get-first-classify',
    method: 'get',
    params
  })
}
// 血缘可见
export function getEWaresPermissionTypeList() {
  return request({
    url: '/system/pub/enums/getEWaresPermissionTypeList',
    method: 'get'
  })
}
// 根据id查询商品规格
export function getProductSpecs(data) {
  return request({
    url: '/sale/manage/product/get-product-specs',
    method: 'post',
    data
  })
}
// 根据id查询商品规格
export function getProductSpecsIsGift(data) {
  return request({
    url: '/sale/manage/product/get-product-specs-gift',
    method: 'post',
    data
  })
}
// 根据产品编号查询商品规格
export function getProductCodeSpecs(data) {
  return request({
    url: '/sale/manage/product/get-product-code-specs',
    method: 'post',
    data
  })
}
// 查询分类父子级关系
export function get_hierarchy_list(params) {
  return request({
    url: '/sale/manage/area-classify/get-hierarchy-list',
    method: 'get',
    params
  })
}
// 查询预售状态
export function presale_status() {
  return request({
    url: '/system/pub/enums/presale-status',
    method: 'get'
  })
}
// 查询供应方式
export function supply_way() {
  return request({
    url: '/system/pub/enums/supply-way',
    method: 'get'
  })
}
// 标签分类
export function labelAll(params) {
  return request({
    url: '/system/manage/label/find-all',
    method: 'get',
    params
  })
}
// 协议列表
export function getAgreementList(params) {
  return request({
    url: '/system/manage/agreement/find-all',
    method: 'get',
    params
  })
}
// 邮费模板
export function getPostageList(params) {
  return request({
    url: '/sale/manage/postage/find-all',
    method: 'get',
    params
  })
}
// 级差等级
export function rangeList() {
  return request({
    url: '/system/manage/grade/gradeRanglist',
    method: 'get'
  })
}
// 级差等级2
export function toRangeList() {
  return request({
    url: '/system/manage/range/find-all',
    method: 'get'
  })
}
// 商品列表
export function waresList(params) {
  return request({
    url: '/sale/manage/wares/list',
    method: 'get',
    params
  })
}
// 删除商品
export function waresDel(id) {
  return request({
    url: '/sale/manage/wares/' + id,
    method: 'delete'
  })
}
// 商品新增
export function waresSave(data) {
  return request({
    url: '/sale/manage/wares/save',
    method: 'post',
    data
  })
}
// 商品编辑
export function waresUpdate(data) {
  return request({
    url: '/sale/manage/wares/update',
    method: 'post',
    data
  })
}
// 商品详情
export function waresDetail(params) {
  return request({
    url: '/sale/manage/wares/detail',
    method: 'get',
    params
  })
}

// 商品上下移动
export function waresMove(params) {
  return request({
    url: '/sale/manage/wares/move',
    method: 'get',
    params
  })
}

// 邮费模板列表
export function postageList(params) {
  return request({
    url: '/sale/manage/postage/list',
    method: 'get',
    params
  })
}

// 删除邮费模板
export function postageDel(id) {
  return request({
    url: '/sale/manage/postage/' + id,
    method: 'delete'
  })
}
// 计费方式
export function getChargeType(params) {
  return request({
    url: '/system/pub/enums/get-charge-type',
    method: 'get',
    params
  })
}
// 计件方式
export function getQuantityModeType(params) {
  return request({
    url: '/system/pub/enums/quantity-mode-list',
    method: 'get',
    params
  })
}
// 查询全部地区
export function findAllArea(params) {
  return request({
    url: '/system/manage/area/find-all',
    method: 'get',
    params
  })
}
// 邮费=》专区
export function orderType() {
  return request({
    url: '/system/pub/enums/special-area',
    method: 'get'
  })
}

// 邮费新增
export function postageSave(data) {
  return request({
    url: '/sale/manage/postage/save',
    method: 'post',
    data
  })
}
// 邮费编辑
export function postageUpdate(data) {
  return request({
    url: '/sale/manage/postage/update',
    method: 'post',
    data
  })
}
// 邮费详情
export function postageDetail(params) {
  return request({
    url: '/sale/manage/postage/detail',
    method: 'get',
    params
  })
}
// 获取产品编号
export function getProductCode(params) {
  return request({
    url: '/sale/manage/product/create-product-code',
    method: 'get',
    params
  })
}
// 获取产品编号
export function getWaresCode(params) {
  return request({
    url: '/sale/manage/wares/create-wares-code',
    method: 'get',
    params
  })
}
// 获取最大排序
export function getMaxSort(params) {
  return request({
    url: '/sale/manage/product/get-max-sort',
    method: 'get',
    params
  })
}
// 单位列表
export function unitList(params) {
  return request({
    url: '/sale/manage/unit/list',
    method: 'get',
    params
  })
}
// 单位新增
export function unitSave(data) {
  return request({
    url: '/sale/manage/unit/save',
    method: 'post',
    data
  })
}
// 单位编辑
export function unitUpdate(data) {
  return request({
    url: '/sale/manage/unit/update',
    method: 'post',
    data
  })
}
// 单位详情
export function unitDetail(params) {
  return request({
    url: '/sale/manage/unit/detail',
    method: 'get',
    params
  })
}
// 删除单位
export function unitDel(id) {
  return request({
    url: '/sale/manage/unit/' + id,
    method: 'delete'
  })
}

// 单位data
export function unitAll(params) {
  return request({
    url: '/sale/manage/unit/find-all',
    method: 'get',
    params
  })
}

// 商品审核列表
export function modifyRecord(params) {
  return request({
    url: '/sale/manage/modify-record/list',
    method: 'get',
    params
  })
}
// 商品审核
export function modifyExamine(data) {
  return request({
    url: '/sale/manage/modify-record/examine',
    method: 'post',
    data
  })
}
// 查询审核状态
export function recordStatus(params) {
  return request({
    url: '/system/pub/enums/get-modify-record-status',
    method: 'get',
    params
  })
}
// 查询部门
export function deptAll(params) {
  return request({
    url: '/system/manage/dept/all',
    method: 'get',
    params
  })
}
// 获取排序
export function waresSort(params) {
  return request({
    url: '/sale/manage/wares/create-wares-sort',
    method: 'get',
    params
  })
}
// 撤单记录
export function orderChargeLog(params) {
  return request({
    url: '/sale/manage/order-charge-log/list',
    method: 'get',
    params
  })
}
// 复购类型
export function repurchaseType(params) {
  return request({
    url: 'system/pub/enums/get-repurchase-type',
    method: 'get',
    params
  })
}
// 团队信息
export function memberTeamInfo(params) {
  return request({
    url: '/member/manager/member/member-team-info',
    method: 'get',
    params
  })
}

// 计算商品业绩
export function computePrice(data) {
  return request({
    url: '/sale/manage/wares/compute-wares-price',
    method: 'post',
    data
  })
}

// 是否
export function yes_no(params) {
  return request({
    url: '/system/pub/enums/yes-no',
    method: 'get',
    params
  })
}
// 消费配置主键
export function special_currency(params) {
  return request({
    url: 'system/manage/special-currency/findAll',
    method: 'get',
    params
  })
}
// 商品类型
export function wares_type(params) {
  return request({
    url: 'system/pub/enums/get-wares-type',
    method: 'get',
    params
  })
}
// 商品权限
export function ERegistrationAuthority(params) {
  return request({
    url: 'system/pub/enums/registration-authority',
    method: 'get',
    params
  })
}
// 产品基本信息
export function productFind(params) {
  return request({
    url: 'scm/manage/product-bas/find-all',
    method: 'get',
    params
  })
}

// 供应商商品列表
export function thProductList(params) {
  return request({
    url: 'scm/manage/th-product/list',
    method: 'get',
    params
  })
}
// 供应商产品基本信息
export function thProductDetail(params) {
  return request({
    url: 'scm/manage/th-product/detail',
    method: 'get',
    params
  })
}
// 特殊邮费
export function specialPostage(params) {
  return request({
    url: 'sale/manage/postage/special-postage',
    method: 'get',
    params
  })
}
// 产品生成
export function generateProduct(params) {
  return request({
    url: 'scm/manage/product-bas/generate-product',
    method: 'get',
    params
  })
}
// 置顶枚举
export function get_sort(params) {
  return request({
    url: 'system/pub/enums/get-sort-status',
    method: 'get',
    params
  })
}

export function getMaxSortNum(params) {
  return request({
    url: 'sale/manage/wares/getMaxSortNum',
    method: 'get',
    params
  })
}
