2025-03-21 16:50:58 +08:00
|
|
|
import request from '@/utils/request';
|
|
|
|
import { AxiosPromise } from 'axios';
|
|
|
|
import { LogisticsQuoteVO, LogisticsQuoteForm, LogisticsQuoteQuery } from '@/api/amz/logisticsQuote/types';
|
2025-04-12 11:09:40 +08:00
|
|
|
import { InquiryQuoteStatusVO } from '@/api/amz/logisticsOrder/types';
|
|
|
|
import { UnwrapRef } from 'vue';
|
2025-03-21 16:50:58 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 查询物流报价列表
|
|
|
|
* @param query
|
|
|
|
* @returns {*}
|
|
|
|
*/
|
|
|
|
|
|
|
|
export const listLogisticsQuote = (query?: LogisticsQuoteQuery): AxiosPromise<LogisticsQuoteVO[]> => {
|
|
|
|
return request({
|
|
|
|
url: '/amz/logisticsQuote/list',
|
|
|
|
method: 'get',
|
|
|
|
params: query
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 根据目的地仓库和渠道查询物流报价列表
|
|
|
|
* @returns {*}
|
|
|
|
* @param destination
|
|
|
|
* @param channelId
|
2025-03-24 18:31:51 +08:00
|
|
|
* @param date
|
2025-03-21 16:50:58 +08:00
|
|
|
*/
|
|
|
|
|
2025-04-12 11:09:40 +08:00
|
|
|
export const queryLogisticsQuote = (destination: string | number, channelId: string, date: string): AxiosPromise<LogisticsQuoteVO[]> => {
|
2025-03-21 16:50:58 +08:00
|
|
|
return request({
|
2025-03-24 18:31:51 +08:00
|
|
|
url: '/amz/logisticsQuote/query/' + destination + '/' + channelId + '/' + date,
|
2025-03-21 16:50:58 +08:00
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 查询物流报价详细
|
|
|
|
* @param id
|
|
|
|
*/
|
|
|
|
export const getLogisticsQuote = (id: string | number): AxiosPromise<LogisticsQuoteVO> => {
|
|
|
|
return request({
|
|
|
|
url: '/amz/logisticsQuote/' + id,
|
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2025-03-25 18:04:58 +08:00
|
|
|
/**
|
|
|
|
* 查询 今天的报价情况
|
|
|
|
* @param id
|
|
|
|
*/
|
2025-04-12 11:09:40 +08:00
|
|
|
export const getTodayQuoteStatus = (): AxiosPromise<InquiryQuoteStatusVO[]> => {
|
2025-03-25 18:04:58 +08:00
|
|
|
return request({
|
|
|
|
url: '/amz/logisticsQuote/today-quote-status',
|
|
|
|
method: 'get'
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2025-03-21 16:50:58 +08:00
|
|
|
/**
|
|
|
|
* 新增物流报价
|
|
|
|
* @param data
|
|
|
|
*/
|
|
|
|
export const addLogisticsQuote = (data: LogisticsQuoteForm) => {
|
|
|
|
return request({
|
|
|
|
url: '/amz/logisticsQuote',
|
|
|
|
method: 'post',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2025-03-24 18:31:51 +08:00
|
|
|
/**
|
|
|
|
* 新增物流报价
|
|
|
|
* @param data
|
|
|
|
*/
|
|
|
|
export const addMostLogisticsQuote = (data: LogisticsQuoteForm) => {
|
|
|
|
return request({
|
|
|
|
url: '/amz/logisticsQuote/most',
|
|
|
|
method: 'post',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2025-04-12 11:09:40 +08:00
|
|
|
/**
|
|
|
|
* 获取物流报价建议
|
|
|
|
* @param data
|
|
|
|
*/
|
|
|
|
export const checkPriceQuoteByBo = (data: LogisticsQuoteForm) => {
|
|
|
|
return request({
|
|
|
|
url: '/amz/logisticsQuote/check-quote-price',
|
|
|
|
method: 'post',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2025-03-21 16:50:58 +08:00
|
|
|
/**
|
|
|
|
* 修改物流报价
|
|
|
|
* @param data
|
|
|
|
*/
|
|
|
|
export const updateLogisticsQuote = (data: LogisticsQuoteForm) => {
|
|
|
|
return request({
|
|
|
|
url: '/amz/logisticsQuote',
|
|
|
|
method: 'put',
|
|
|
|
data: data
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 删除物流报价
|
|
|
|
* @param id
|
|
|
|
*/
|
|
|
|
export const delLogisticsQuote = (id: string | number | Array<string | number>) => {
|
|
|
|
return request({
|
|
|
|
url: '/amz/logisticsQuote/' + id,
|
|
|
|
method: 'delete'
|
|
|
|
});
|
|
|
|
};
|