123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873 |
- // +----------------------------------------------------------------------
- // | 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";
- /**
- * 统计数据
- */
- 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 getStoreOrderList(where) {
- return request.get("store/order/list", where, {
- login: true
- });
- }
- /**
- * 平台-提醒发货
- */
- export function getDelivery(id) {
- return request.get(`admin/order/delivery/remind/${id}`,{
- login: true
- });
- }
- /**
- * 订单改价
- */
- export function setAdminOrderPrice(data) {
- return request.post("admin/order/price", data, {
- login: true
- });
- }
- /**
- * 门店中心-订单改价
- */
- export function setStoreOrderPrice(data) {
- return request.post("store/order/price", data, {
- login: true
- });
- }
- /**
- * 订单备注
- */
- export function setAdminOrderRemark(data) {
- return request.post("admin/order/remark", data, {
- login: true
- });
- }
- /**
- * 门店-订单备注
- */
- export function setStoreOrderRemark(data) {
- return request.post("admin/order/remark", data, {
- login: true
- });
- }
- /**
- * 订单备注(退款)
- */
- export function setAdminRefundRemark(data) {
- return request.post("admin/refund_order/remark", data, {
- login: true
- });
- }
- /**
- * 门店-订单备注(退款)
- */
- export function setStoreRefundRemark(data) {
- return request.post("admin/refund_order/remark", data, {
- login: true
- });
- }
- /**
- * 订单详情
- */
- export function getAdminOrderDetail(orderId) {
- return request.get("admin/order/detail/" + orderId, {}, {
- login: true
- });
- }
- /**
- * 门店-订单详情
- */
- export function getStoreOrderDetail(orderId) {
- return request.get("store/order/detail/" + orderId, {}, {
- login: true
- });
- }
- /**
- * 订单详情(退款)
- */
- export function getAdminRefundDetail(orderId) {
- return request.get("admin/refund_order/detail/" + orderId, {}, {
- login: true
- });
- }
- /**
- * 门店-订单详情(退款)
- */
- export function getStoreRefundDetail(orderId) {
- return request.get("store/refund_order/detail/" + orderId, {}, {
- login: true
- });
- }
- /**
- * 订单发货信息获取
- */
- export function getAdminOrderDelivery(orderId) {
- return request.get(
- "admin/order/delivery/gain/" + orderId, {}, {
- login: true
- }
- );
- }
- /**
- * 门店中心-订单发货信息获取
- */
- export function getStoreOrderDelivery(orderId) {
- return request.get(
- "store/order/delivery/gain/" + orderId, {}, {
- login: true
- }
- );
- }
- /**
- * 订单发货保存
- */
- export function setAdminOrderDelivery(id, data) {
- return request.post("admin/order/delivery/keep/" + id, data, {
- login: true
- });
- }
- /**
- * 门店-订单发货保存
- */
- export function setStoreOrderDelivery(id, data) {
- return request.post("store/order/delivery/keep/" + id, data, {
- login: true
- });
- }
- /**
- * 订单统计图
- */
- export function getStatisticsTime(data) {
- return request.get("admin/order/time", data, {
- login: true
- });
- }
- /**
- * 线下付款订单确认付款
- */
- export function setOfflinePay(data) {
- return request.post("admin/order/offline", data, {
- login: true
- });
- }
- /**
- * 门店中心-线下付款订单确认付款
- */
- export function setStoreOfflinePay(data) {
- return request.post("store/order/offline", data, {
- login: true
- });
- }
- /**
- * 订单确认退款
- */
- export function setOrderRefund(data) {
- return request.post("admin/order/refund", data, {
- login: true
- });
- }
- /**
- * 门店中心 - 订单确认退款
- */
- export function setStoreOrderRefund(data) {
- return request.post("store/order/refund", data, {
- login: true
- });
- }
- /**
- * 获取快递公司
- * @returns {*}
- */
- export function getLogistics(data) {
- return request.get("logistics", data, {
- login: false
- });
- }
- /**
- * 订单核销
- * @returns {*}
- */
- export function orderVerific(code, auth) {
- return request.post("admin/order/order_verific", {
- code,
- auth,
- });
- }
- /**
- * 门店-订单核销
- * @returns {*}
- */
- export function storeOrderVerific(code, auth) {
- return request.post("store/order/order_verific", {
- code,
- auth,
- });
- }
- /**
- * 获取物流公司模板
- * @returns {*}
- */
- export function orderExportTemp(data) {
- return request.get("admin/order/export_temp", data);
- }
- /**
- * 门店-获取物流公司模板
- * @returns {*}
- */
- export function storeOrderExportTemp(data) {
- return request.get("store/order/export_temp", data);
- }
- /**
- * 获取订单打印默认配置
- * @returns {*}
- */
- export function orderDeliveryInfo() {
- return request.get("admin/order/delivery_info");
- }
- /**
- * 门店-获取订单打印默认配置
- * @returns {*}
- */
- export function storeOrderDeliveryInfo() {
- return request.get("store/order/delivery_info");
- }
- /**
- * 配送员列表
- * @returns {*}
- */
- export function orderOrderDelivery() {
- return request.get("admin/order/delivery");
- }
- /**
- * 门店-配送员列表
- * @returns {*}
- */
- export function storeOrderDelivery() {
- return request.get("store/order/delivery");
- }
- // 门店
- /**
- * 店员用户信息
- */
- export function userInfo() {
- return request.get("store/staff/info");
- }
- /**
- * 工作台-今日销售额统计
- */
- export function staffStaging(data) {
- return request.get("store/staff/staging",data);
- }
- /**
- * 工作台-数据统计
- */
- export function statisticsMenuApi(data) {
- return request.get("store/staff/statistics",data);
- }
- /**
- * 门店中心-订单统计
- */
- export function orderInfo(data) {
- return request.get("store/order/statistics",data);
- }
- /**
- * 门店中心-详细数据列表
- */
- export function getListApi(data) {
- return request.get("store/order/data",data);
- }
- /**
- * 门店中心-数据详情-列表
- */
- export function getStatisticsListApi(type,data) {
- return request.get("store/staff/data/"+type,data);
- }
- /**
- * 配送员-获取用户信息
- */
- export function deliveryInfo(id) {
- return request.get("store/delivery/info");
- }
- /**
- * 配送员-获取配送统计数据
- */
- export function deliveryStatistics(data) {
- return request.get("store/delivery/statistics",data);
- }
- /**
- * 配送员-获取配送统计数据列表
- */
- export function deliveryList(data) {
- return request.get("store/delivery/data",data);
- }
- /**
- * 配送员-获取订单列表数据列表
- */
- export function deliveryOrderList(data) {
- return request.get("store/delivery/order",data);
- }
- /**
- * 门店中心-订单取消、删除
- */
- export function OrderDel(id) {
- return request.delete("store/order/del/"+id);
- }
- /**
- * 门店中心-订单取消、取消
- */
- export function OrderCancel(id) {
- return request.post("store/order/cancel/"+id);
- }
- /**
- * 配送员-扫码核销获取订单信息
- */
- export function orderWriteoffInfo(type,data) {
- return request.get("store/order/writeoff_info/"+type,data);
- }
- /**
- * 代客下单-购物车删除
- */
- export function adminCartDel(uid,data) {
- return request.delete(`admin/order/cart/del/${uid}`,data);
- }
- /**
- * 代客下单-修改购物车数量
- */
- export function adminCartNum(uid,data) {
- return request.post(`admin/order/cart/num/${uid}`,data);
- }
- /**
- * 配送员-核销订单获取商品信息 (门店平台一个接口)
- */
- export function orderCartInfo(data) {
- return request.post("store/order/cart_info",data);
- }
- /**
- * 配送员-订单核销 (门店平台一个接口)
- */
- export function orderWriteoff(data) {
- return request.post("store/order/writeoff",data);
- }
- /**
- * 统计管理-获取订单可拆分商品列表
- */
- export function orderSplitInfo(id) {
- return request.get("admin/order/split_cart_info/"+id);
- }
- /**
- * 门店-统计管理-获取订单可拆分商品列表
- */
- export function storeOrderSplitInfo(id) {
- return request.get("store/order/split_cart_info/"+id);
- }
- /**
- * 统计管理-提交
- */
- export function orderSplitDelivery(id,data) {
- return request.put("admin/order/split_delivery/"+id,data);
- }
- /**
- * 门店-统计管理-提交
- */
- export function storeOrderSplitDelivery(id,data) {
- return request.put("store/order/split_delivery/"+id,data);
- }
- /**
- * 统计管理-退货退款
- */
- export function orderRefundAgree(id) {
- return request.post("admin/order/refund_agree/"+id);
- }
- /**
- * 门店中心-退货退款
- */
- export function storeOrderRefundAgree(id) {
- return request.post("store/order/refund_agree/"+id);
- }
- /**
- * 门店中心-获取订单可拆分商品列表
- */
- export function storeSplitInfo(id) {
- return request.get("store/order/split_cart_info/"+id);
- }
- /**
- * 门店中心-提交
- */
- export function storeSplitDelivery(id,data) {
- return request.put("store/order/split_delivery/"+id,data);
- }
- /**
- * 门店中心-退货退款
- */
- export function storeRefundAgree(id) {
- return request.post("store/order/refund_agree/"+id);
- }
- /**
- * 平台-退款列表
- */
- export function adminRefundList(data) {
- return request.get("admin/refund_order/list",data);
- }
- /**
- * 门店中心-退款列表
- */
- export function storeRefundList(data) {
- return request.get("store/refund_order/list",data);
- }
- /**
- * 平台-商品列表
- */
- export function adminProductList(data) {
- return request.get("admin/product/admin_list",data);
- }
- /**
- * 门店-商品列表
- */
- export function storeProductList(data) {
- return request.get("store/product/admin_list",data);
- }
- /**
- * 平台-商品列表-上下架
- */
- export function productSetShow(data) {
- return request.post('admin/product/set_show',data);
- }
- /**
- * 门店-商品列表-上下架
- */
- export function storeProductSetShow(data) {
- return request.post('store/product/set_show',data);
- }
- /**
- * 平台-商品列表-标签
- */
- export function getProductLabel() {
- return request.get('admin/product/product_label');
- }
- /**
- * 门店-商品列表-标签
- */
- export function storeProductLabel() {
- return request.get('store/product/product_label');
- }
- /**
- * 平台-商品列表-提交标签/分类
- */
- export function postBatchProcess(data) {
- return request.post('admin/product/batch_process',data);
- }
- /**
- * 门店-商品列表-提交标签/分类
- */
- export function storeBatchProcess(data) {
- return request.post('store/product/batch_process',data);
- }
- /**
- * 平台-商品列表-修改库存价格
- */
- export function postUpdateAttrs(id,data) {
- return request.post(`admin/product/update_attrs/${id}`,data);
- }
- /**
- * 门店-商品列表-修改库存价格
- */
- export function postStoreUpdateAttrs(id,data) {
- return request.post(`store/product/update_attrs/${id}`,data);
- }
- /**
- * 平台-商品列表-获取规格
- */
- export function getGetAttrs(id) {
- return request.get(`admin/product/get_attr/${id}`);
- }
- /**
- * 门店-商品列表-获取规格
- */
- export function getStoreGetAttrs(id) {
- return request.get(`store/product/get_attr/${id}`);
- }
- /**
- * 平台-商品列表-获取分类
- */
- export function getCategory() {
- return request.get(`admin/product/category`);
- }
- /**
- * 门店-商品列表-获取分类
- */
- export function getStoreCategory() {
- return request.get(`store/product/category`);
- }
- /**
- * 平台-用户列表
- */
- export function getUserList(data) {
- return request.get(`admin/user/list`,data);
- }
- /**
- * 门店-用户列表
- */
- export function getStoreUserList(data) {
- return request.get(`store/user/list`,data);
- }
- /**
- * 平台-修改余额、积分
- */
- export function postUserUpdateOther(uid,data) {
- return request.post(`admin/user/update_other/${uid}`,data);
- }
- /**
- * 平台-分组列表
- */
- export function getGroupList() {
- return request.get(`admin/user/group/list`);
- }
- /**
- * 平台-门店列表
- */
- export function getStoreGroupList() {
- return request.get(`store/user/group/list`);
- }
- /**
- * 平台-修改用户信息
- */
- export function postUserUpdate(data) {
- return request.post(`admin/user/update`,data);
- }
- /**
- * 平台-优惠券
- */
- export function getUserCoupon(data) {
- return request.get(`admin/user/coupon/grant`,data);
- }
- /**
- * 平台-用户标签
- */
- export function getUserLabel() {
- return request.get(`admin/user/label/0`);
- }
- /**
- * 门店-用户标签
- */
- export function getStoreUserLabel() {
- return request.get(`store/user/label/0`);
- }
- /**
- * 平台-等级列表
- */
- export function getLevelList() {
- return request.get(`admin/user/level/list`);
- }
- /**
- * 门店-等级列表
- */
- export function getStoreLevelList() {
- return request.get(`store/user/level/list`);
- }
- /**
- * 平台-用户详情
- */
- export function getUserInfo(uid) {
- return request.get(`admin/user/info/${uid}`);
- }
- /**
- * 门店-用户详情
- */
- export function getStoreUserInfo(uid) {
- return request.get(`store/user/info/${uid}`);
- }
- /**
- * 代客下单-用户列表
- */
- export function adminUserList(data) {
- return request.get("admin/user/list",data);
- }
- /**
- * 代客下单-商品分类
- */
- export function adminCategory() {
- return request.get("admin/product/category");
- }
- /**
- * 代客下单-商品列表
- */
- export function adminProList(data) {
- return request.get("admin/product/list",data);
- }
- /**
- * 代客下单-加入购物车
- */
- export function adminCartAdd(uid,data) {
- return request.post(`admin/order/cart/add/${uid}`,data);
- }
- /**
- * 代客下单-购物车列表
- */
- export function adminCartList(uid,data) {
- return request.get(`admin/order/cart/${uid}`,data);
- }
- /**
- * 代客下单-用户地址列表
- */
- export function adminUserAddressList(uid,data) {
- return request.get(`admin/user/address/list/${uid}`,data);
- }
- /**
- * 代客下单-订单确认
- */
- export function orderConfirm(uid,data) {
- return request.post(`admin/order/confirm/${uid}`,data);
- }
- /**
- * 代客下单-订单计算
- */
- export function postOrderComputed(key,uid,data) {
- return request.post(`admin/order/computed/${key}/${uid}`,data);
- }
- /**
- * 代客下单-获取用户可使用优惠券列表
- */
- export function getCouponsOrderPrice(uid,data) {
- return request.get(`admin/order/coupons/${uid}`,data);
- }
- /**
- * 代客下单-订单查创建
- */
- export function orderCreate(key,uid,data) {
- return request.post(`admin/order/create/${key}/${uid}`,data);
- }
- /**
- * 代客下单-订单收银台
- */
- export function getCashierApi(uid,data) {
- return request.post(`admin/order/pay/${uid}`,data);
- }
- /**
- * 代客下单-轮询获取订单支付状态
- */
- export function getPayStatusApi(data) {
- return request.get(`admin/order/pay/status`,data);
- }
- /**
- * 代客下单-下单订单记录
- */
- export function adminOrderRecordList(data) {
- return request.get(`admin/order/place/list`,data);
- }
- /**
- * 工作台折线图数据统计
- */
- export function getOrderChart(data) {
- return request.get('admin/order/time/chart', data);
- }
- /**
- * 门店工作台折线图数据统计
- */
- export function getStoreChart(type,data) {
- return request.get(`store/staff/chart/${type}`, data);
- }
- /**
- * 工作台待发货等数据
- */
- export function getOrderStaging() {
- return request.get('admin/order/staging');
- }
- /**
- * 工作台今日订单数等数据
- */
- export function getOrderTime(data) {
- return request.get('admin/order/time', data);
- }
- /**
- * 拆单退款
- * @param {Object} id
- * @param {Object} data
- */
- export function openRefund(id, data) {
- return request.post(`admin/order/open/refund/${id}`,data);
- }
- /**
- * 核销订单商品列表
- * @param {Object} data
- */
- export function offOrderInfo(data) {
- return request.post(`admin/order/info`,data);
- }
- /**
- * 核销订单
- * @param {Object} order_id
- * @param {Object} data
- */
- export function orderWirteOff(order_id, data) {
- return request.post(`admin/order/wirteoff/${order_id}`,data);
- }
- /**
- * 订单核销记录
- * @param {Object} id
- * @param {Object} data
- */
- export function orderWirteOffRecords(id, data) {
- return request.post(`admin/order/writeoff/records/${id}`, data);
- }
- /**
- * 门店-订单核销记录
- * @param {Object} id
- * @param {Object} data
- */
- export function storeWirteOffRecords(id, data) {
- return request.post(`store/order/writeoff/records/${id}`, data);
- }
- /**
- * 确认订单详情(是否显示快递配送)
- * @param {Object} data
- */
- export function check_shipping(data) {
- return request.post(`admin/order/check_shipping`, data);
- }
|