92 lines
1.9 KiB
JavaScript
92 lines
1.9 KiB
JavaScript
import request from '@/sheep/request';
|
|
|
|
const OrderStoreApi = {
|
|
getPendingList: (params = {}) => {
|
|
return request({
|
|
url: '/trade/order-store/pending',
|
|
method: 'GET',
|
|
params,
|
|
custom: {
|
|
showLoading: false,
|
|
},
|
|
});
|
|
},
|
|
getStaffList: (params = {}) => {
|
|
return request({
|
|
url: '/trade/order-store/staff/list',
|
|
method: 'GET',
|
|
params,
|
|
custom: {
|
|
showLoading: false,
|
|
},
|
|
});
|
|
},
|
|
getRecentCompleted: (pickUpStoreId, days = 7) => {
|
|
return request({
|
|
url: '/trade/order-store/staff/recent-completed',
|
|
method: 'GET',
|
|
params: {
|
|
pickUpStoreId,
|
|
days,
|
|
},
|
|
custom: {
|
|
showLoading: false,
|
|
},
|
|
});
|
|
},
|
|
getTodayNewCount: (pickUpStoreId) => {
|
|
return request({
|
|
url: '/trade/order-store/staff/today-new-count',
|
|
method: 'GET',
|
|
params: {
|
|
pickUpStoreId,
|
|
},
|
|
custom: {
|
|
showLoading: false,
|
|
},
|
|
});
|
|
},
|
|
getPreparationStatus: (pickUpStoreId, orderId) => {
|
|
return request({
|
|
url: '/trade/order-store/preparation-status',
|
|
method: 'GET',
|
|
params: {
|
|
pickUpStoreId,
|
|
orderId,
|
|
},
|
|
custom: {
|
|
showLoading: false,
|
|
},
|
|
});
|
|
},
|
|
markSorted: (ids) => {
|
|
const idText = Array.isArray(ids) ? ids.filter(Boolean).join(',') : String(ids || '');
|
|
return request({
|
|
url: '/trade/order-store/staff/mark-sorted',
|
|
method: 'PUT',
|
|
params: {
|
|
ids: idText,
|
|
},
|
|
custom: {
|
|
showSuccess: true,
|
|
successMsg: '已标记分拣',
|
|
},
|
|
});
|
|
},
|
|
verify: (pickUpVerifyCode) => {
|
|
return request({
|
|
url: '/trade/order-store/staff/verify',
|
|
method: 'PUT',
|
|
params: {
|
|
pickUpVerifyCode: String(pickUpVerifyCode || '').trim(),
|
|
},
|
|
custom: {
|
|
showSuccess: true,
|
|
successMsg: '核销成功',
|
|
},
|
|
});
|
|
},
|
|
};
|
|
|
|
export default OrderStoreApi;
|