392 lines
7.9 KiB
JavaScript
392 lines
7.9 KiB
JavaScript
// +----------------------------------------------------------------------
|
||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||
// +----------------------------------------------------------------------
|
||
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
||
// +----------------------------------------------------------------------
|
||
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||
// +----------------------------------------------------------------------
|
||
// | Author: CRMEB Team <admin@crmeb.com>
|
||
// +----------------------------------------------------------------------
|
||
import request from "@/utils/request.js";
|
||
|
||
/**
|
||
* 设置自提人姓名 电话
|
||
* @returns {*}
|
||
*/
|
||
export function delivery(data) {
|
||
return request.post(`admin/${data.mer_id}/delivery/${data.order_id}`, data);
|
||
}
|
||
|
||
/**
|
||
* 统计数据
|
||
*/
|
||
export function getStatisticsInfo() {
|
||
return request.get("admin/order/statistics", {}, {
|
||
login: true
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 订单月统计
|
||
*/
|
||
export function getStatisticsMonth(where) {
|
||
return request.get("admin/order/data", where, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 订单月统计
|
||
*/
|
||
export function getAdminOrderList(where) {
|
||
return request.get("admin/order/list", where, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 订单改价
|
||
*/
|
||
export function setAdminOrderPrice(merId, id, data) {
|
||
return request.post("admin/" + merId + "/price/" + id, data, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 同意先货后款
|
||
*/
|
||
export function postconfirm(merId, data) {
|
||
return request.post("admin/" + merId + "/confirm", data, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 先货后款订单结算
|
||
*/
|
||
export function postsettle(merId, data) {
|
||
return request.post("admin/" + merId + "/settle", data, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 订单备注
|
||
*/
|
||
export function setAdminOrderRemark(merId, id, data) {
|
||
return request.post("admin/" + merId + "/mark/" + id, data, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 订单详情
|
||
*/
|
||
export function getAdminOrderDetail(merId, orderId) {
|
||
return request.get("admin/" + merId + "/order/" + orderId, {}, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 其他订单详情
|
||
*/
|
||
export function getAdminOtherOrderDetail(merId, orderId) {
|
||
return request.get("admin/other/" + merId + "/order/" + orderId, {}, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 订单发货信息获取
|
||
*/
|
||
export function getAdminOrderDelivery(orderId) {
|
||
return request.get("admin/order/delivery/gain/" + orderId, {}, {
|
||
login: true
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 订单发货保存
|
||
*/
|
||
export function setAdminOrderDelivery(merId, id, data) {
|
||
return request.post("admin/" + merId + "/delivery/" + id, data, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 其他订单发货保存
|
||
*/
|
||
export function setAdminOtherOrderDelivery(merId, id, data) {
|
||
return request.post("admin/other/" + merId + "/delivery/" + id, data, {
|
||
login: true
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 订单统计图
|
||
*/
|
||
export function getStatisticsTime(data) {
|
||
return request.get("admin/order/time", data, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 线下付款订单确认付款
|
||
*/
|
||
export function setOfflinePay(merId, data) {
|
||
return request.post("admin/" + merId + "/order/offline", data, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 订单确认退款
|
||
*/
|
||
export function setOrderRefund(merId, data) {
|
||
return request.post("admin/" + merId + "/order/refund", data, {
|
||
login: true
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 获取快递公司
|
||
* @returns {*}
|
||
*/
|
||
export function getLogistics() {
|
||
return request.get("logistics", {}, {
|
||
login: false
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 订单核销
|
||
* @returns {*}
|
||
*/
|
||
export function orderVerific(merId, id, data) {
|
||
return request.post(`verifier/${merId}/${id}`, data);
|
||
}
|
||
|
||
/**
|
||
* 核销订单详情
|
||
* @returns {*}
|
||
*/
|
||
export function verifierOrder(mer_id, code) {
|
||
return request.get("verifier/" + mer_id + "/order/" + code);
|
||
}
|
||
|
||
/**
|
||
* 订单统计数
|
||
* @returns {*}
|
||
*/
|
||
export function orderStatistics(mer_id, data) {
|
||
return request.get("admin/" + mer_id + "/statistics", data);
|
||
}
|
||
/**
|
||
* 其他订单统计数
|
||
* @returns {*}
|
||
*/
|
||
export function otherOrderStatistics(mer_id, data) {
|
||
return request.get("admin/other/" + mer_id + "/statistics", data);
|
||
}
|
||
/**
|
||
* 订单
|
||
* @returns {*}
|
||
*/
|
||
export function orderStat(data) {
|
||
return request.get("admin/1/statistics", data);
|
||
}
|
||
/**
|
||
* 每日成交额
|
||
* @returns {*}
|
||
*/
|
||
export function orderPrice(where, mer_id) {
|
||
return request.get("admin/" + mer_id + "/order_price", where, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 订单列表
|
||
* @returns {*}
|
||
*/
|
||
export function getOrderList(where, merId) {
|
||
return request.get(`admin/${merId}/order_list`, where, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 其他订单列表
|
||
* @returns {*}
|
||
*/
|
||
export function getOtherOrderList(where, merId) {
|
||
return request.get(`admin/other/${merId}/order_list`, where, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 退款订单列表
|
||
* @returns {*}
|
||
*/
|
||
export function getRefundOrderList(where, merId) {
|
||
return request.get(`server/${merId}/refund/lst`, where, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 店铺拉新二维码
|
||
* @returns {*}
|
||
*/
|
||
export function getMerNewQRcode(where, merId) {
|
||
return request.get(`server/${merId}/qrcode`, where, {
|
||
login: true
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 商户拉新记录
|
||
*/
|
||
export function pullNewUserRecord(where, merId) {
|
||
return request.get(`server/${merId}/record`, where, {
|
||
noAuth: true
|
||
});
|
||
}
|
||
/**
|
||
* 营业额统计
|
||
* @returns {*}
|
||
*/
|
||
export function turnoverStatistics(where, merId) {
|
||
return request.get(`admin/${merId}/pay_price`, where, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 订单统计
|
||
* @returns {*}
|
||
*/
|
||
export function orderNumberStatistics(where, merId) {
|
||
return request.get(`admin/${merId}/pay_number`, where, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 获取订单打印默认配置
|
||
* @returns {*}
|
||
*/
|
||
export function orderDeliveryInfo(merId) {
|
||
return request.get(`admin/${merId}/mer_form`);
|
||
}
|
||
/**
|
||
* 获取电子面单列表
|
||
* @returns {*}
|
||
*/
|
||
export function orderExportTemp(data) {
|
||
return request.get("store/expr/temps", data);
|
||
}
|
||
/**
|
||
* 是否开始电子面单和同城配送
|
||
* @returns {*}
|
||
*/
|
||
export function getTempAndDelivery(merId) {
|
||
return request.get(`admin/${merId}/delivery_config`);
|
||
}
|
||
/**
|
||
* 获取同城配送门店列表
|
||
* @returns {*}
|
||
*/
|
||
export function getDeliveryStoreLst(merId) {
|
||
return request.get(`admin/${merId}/delivery_options`);
|
||
}
|
||
/**
|
||
* 退款订单信息
|
||
* @returns {*}
|
||
*/
|
||
export function getRefundOrderInfo(merId, id) {
|
||
return request.get(`server/${merId}/refund/get/${id}`);
|
||
}
|
||
/**
|
||
* 提交退款订单信息
|
||
* @returns {*}
|
||
*/
|
||
export function refundOrderSubmit(merId, id, data) {
|
||
return request.post(`server/${merId}/refund/status/${id}`, data, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 退款单确认收货
|
||
* @returns {*}
|
||
*/
|
||
export function refundOrderReceive(merId, id) {
|
||
return request.post(`server/${merId}/refund/confirm/${id}`, {}, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 退款单详情
|
||
*/
|
||
export function getRefundOrderDetail(merId, orderId) {
|
||
return request.get(`server/${merId}/refund/detail/${orderId}`, {}, {
|
||
login: true
|
||
});
|
||
}
|
||
/**
|
||
* 添加退款单备注信息
|
||
*/
|
||
export function setRefundMark(merId, orderId, data) {
|
||
return request.post(`server/${merId}/refund/mark/${orderId}`, data, {
|
||
login: true
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 去核销
|
||
* @param object data
|
||
*/
|
||
export function orderCancellation(merId, id) {
|
||
return request.post(`admin/${merId}/verify/${id}`);
|
||
}
|
||
/**
|
||
* 去核销
|
||
* @param object data
|
||
*/
|
||
export function purchaseOrder(where, merId) {
|
||
return request.get(`admin/${merId}/purchaseOrder`, where, {
|
||
login: true
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 商家物流取件二维码
|
||
* @param object data
|
||
*/
|
||
export function logisticsCode(id) {
|
||
return request.get(`order/logistics_code/${id}`);
|
||
}
|
||
|
||
/*
|
||
补贴完成进度
|
||
*/
|
||
export function getSubsidy(merId, data) {
|
||
return request.get(`server/${merId}/subsidy`, data, {
|
||
login: true
|
||
});
|
||
}
|
||
|
||
/*
|
||
补贴记录
|
||
*/
|
||
export function getSubsidyRecord(merId, data) {
|
||
return request.get(`server/${merId}/subsidyRecord`, data, {
|
||
login: true
|
||
});
|
||
}
|
||
|
||
/*
|
||
领取补贴
|
||
*/
|
||
export function couponReceive(data) {
|
||
return request.get(`server/${data.mer_id}/subsidyReceive/${data.id}`);
|
||
}
|
||
|
||
/*
|
||
拒绝领取补贴
|
||
*/
|
||
export function couponRefuse(data) {
|
||
return request.post(`server/${data.mer_id}/subsidyRefuse/${data.id}`, {
|
||
reason: data.reason
|
||
}, {
|
||
login: true
|
||
});
|
||
} |