123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- import { axios } from '@/utils/request'
- // 供应商 列表 有分页
- export const supplierList = (params) => {
- const url = `/supplier/queryPage/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post'
- })
- }
- // 供应商成本变更记录
- export const supplierProductCostLogList = (params) => {
- const url = `/supplierProductCostLog/queryPage/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post'
- })
- }
- // 成本变更导出明细
- export const supplierProductCostLogExport = params => {
- return axios.request({
- url: `/supplierProductCostLog/export`,
- method: 'post',
- data: params,
- responseType: 'blob'
- })
- }
- // 供应商 列表 无分页
- export const supplierAllList = (params) => {
- return axios({
- url: '/supplier/queryAll',
- method: 'get'
- })
- }
- // 供应商 详情
- export const supplierDetail = (params) => {
- return axios({
- url: `/supplier/findBySn/${params.sn}`,
- method: 'get'
- })
- }
- // 供应商 保存
- export const supplierSave = (params) => {
- return axios({
- url: '/supplier/save',
- data: params,
- method: 'post'
- })
- }
- // 启用禁用
- export const updateEnableStatus = (params) => {
- return axios({
- url: `/supplier/enable/${params.sn}/${params.flag}`,
- data: params,
- method: 'post'
- })
- }
- // 分页查询供应商产品列表
- export const supplierProductList = (params) => {
- const url = `/supplierProduct/queryPage/${params.pageNo}/${params.pageSize}`
- delete params.pageNo
- delete params.pageSize
- return axios({
- url: url,
- data: params,
- method: 'post'
- })
- }
- // 设置成本价
- export const settingCost = (params) => {
- return axios({
- url: `/supplierProduct/settingCost`,
- data: params,
- method: 'post'
- })
- }
- // 删除产品信息
- export const deleteProduct = (params) => {
- return axios({
- url: `/supplierProduct/deleteProduct/${params.sn}`,
- method: 'get'
- })
- }
- // 添加产品信息
- export const addProduct = (params) => {
- return axios({
- url: `/supplierProduct/addProduct`,
- data: params,
- method: 'post'
- })
- }
- // 查询供应商产品sn集合
- export const supplierProductSnList = (params) => {
- return axios({
- url: `/supplierProduct/queryProductSnList/${params.sn}`,
- method: 'get'
- })
- }
- // 供应商关联产品 下载模板
- export const supplierProductDownload = params => {
- return axios.request({
- url: `/supplierProduct/downloadExcel`,
- method: 'post',
- responseType: 'blob'
- })
- }
- // 设置成本导出明细
- export const supplierProductExportDetail = params => {
- return axios.request({
- url: `/supplierProduct/export`,
- method: 'post',
- data: params,
- responseType: 'blob'
- })
- }
- // 审核成本价
- export const supplierProductUpdateAuditState = params => {
- return axios.request({
- url: `/supplierProduct/updateAuditState`,
- method: 'post',
- data: params
- })
- }
- // 供应商关联产品 解析导入的文件
- export const supplierProductParseProducts = params => {
- return axios({
- url: '/supplierProduct/parseProducts',
- data: params,
- method: 'post'
- })
- }
- // 供应商关联产品 批量插入
- export const supplierProductBatchInsert = params => {
- return axios({
- url: '/supplierProduct/batchInsert',
- data: params,
- method: 'post'
- })
- }
- // 供应商关联产品 导入产品 导出错误项
- export const supplierProductailExcel = (params) => {
- return axios({
- url: '/supplierProduct/downloadFailExcel',
- data: params,
- method: 'post',
- responseType: 'blob'
- })
- }
|