上传凭证

This commit is contained in:
DESKTOP-GMUNQ1B\k 2024-03-14 17:59:10 +08:00
parent a227900603
commit 4f826ddd26
2 changed files with 102 additions and 54 deletions

View File

@ -14,14 +14,14 @@ import request from "@/utils/request.js";
* @param numType boolean true 购物车数量,false=购物车产品数量 * @param numType boolean true 购物车数量,false=购物车产品数量
*/ */
export function getCartCounts(data) { export function getCartCounts(data) {
return request.get("user/cart/count", data); return request.get("user/cart/count", data);
} }
/** /**
* 获取购物车列表 * 获取购物车列表
* *
*/ */
export function getCartList(data) { export function getCartList(data) {
return request.get("user/cart/lst", data); return request.get("user/cart/lst", data);
} }
/** /**
@ -30,21 +30,21 @@ export function getCartList(data) {
* @param int number 修改数量 * @param int number 修改数量
*/ */
export function changeCartNum(cartId, data) { export function changeCartNum(cartId, data) {
return request.post("user/cart/change/" + cartId, data); return request.post("user/cart/change/" + cartId, data);
} }
/** /**
* 清除购物车 * 清除购物车
* @param object ids * @param object ids
*/ */
export function cartDel(data) { export function cartDel(data) {
return request.post('user/cart/delete', data); return request.post('user/cart/delete', data);
} }
/** /**
* 订单列表 * 订单列表
* @param object data * @param object data
*/ */
export function getOrderList(data) { export function getOrderList(data) {
return request.get('order/list', data); return request.get('order/list', data);
} }
/** /**
@ -52,7 +52,7 @@ export function getOrderList(data) {
* @param object data * @param object data
*/ */
export function getOtherOrderList(data) { export function getOtherOrderList(data) {
return request.get('other_order/list', data); return request.get('other_order/list', data);
} }
/** /**
@ -60,7 +60,7 @@ export function getOtherOrderList(data) {
* @param string unique * @param string unique
*/ */
export function orderProduct(orderId) { export function orderProduct(orderId) {
return request.get('reply/product/' + orderId); return request.get('reply/product/' + orderId);
} }
/** /**
@ -69,7 +69,7 @@ export function orderProduct(orderId) {
* *
*/ */
export function orderComment(id, data) { export function orderComment(id, data) {
return request.post('reply/' + id, data); return request.post('reply/' + id, data);
} }
/** /**
@ -77,20 +77,20 @@ export function orderComment(id, data) {
* @param object data * @param object data
*/ */
export function orderPay(id, data) { export function orderPay(id, data) {
return request.post('order/pay/' + id, data); return request.post('order/pay/' + id, data);
} }
/** /**
* 订单统计数据 * 订单统计数据
*/ */
export function orderData(data) { export function orderData(data) {
return request.get('order/number', data) return request.get('order/number', data)
} }
/** /**
* 其他订单统计数据 * 其他订单统计数据
*/ */
export function otherOrderData(data) { export function otherOrderData(data) {
return request.get('other_order/number', data) return request.get('other_order/number', data)
} }
@ -109,7 +109,7 @@ export function otherOrderData(data) {
* *
*/ */
export function unOrderCancel(id) { export function unOrderCancel(id) {
return request.post('order/cancel/' + id); return request.post('order/cancel/' + id);
} }
/** /**
@ -118,7 +118,7 @@ export function unOrderCancel(id) {
* *
*/ */
export function orderDel(id) { export function orderDel(id) {
return request.post('order/del/' + id); return request.post('order/del/' + id);
} }
/** /**
@ -126,7 +126,7 @@ export function orderDel(id) {
* @param string uni * @param string uni
*/ */
export function getOrderDetail(uni) { export function getOrderDetail(uni) {
return request.get('order/detail/' + uni); return request.get('order/detail/' + uni);
} }
/** /**
@ -134,20 +134,20 @@ export function getOrderDetail(uni) {
* @param string uni * @param string uni
*/ */
export function getOtherOrderDetail(uni) { export function getOtherOrderDetail(uni) {
return request.get('other_order/detail/' + uni); return request.get('other_order/detail/' + uni);
} }
/** /**
* 未付款订单详情 * 未付款订单详情
* @param string uni * @param string uni
*/ */
export function groupOrderDetail(uni,product_type) { export function groupOrderDetail(uni, product_type) {
return request.get('order/group_order_detail/' + uni+'?product_type=' + product_type); return request.get('order/group_order_detail/' + uni + '?product_type=' + product_type);
} }
// 支付状态订单 // 支付状态订单
export function getPayOrder(uni) { export function getPayOrder(uni) {
return request.get('order/status/' + uni); return request.get('order/status/' + uni);
} }
/** /**
@ -156,7 +156,7 @@ export function getPayOrder(uni) {
* *
*/ */
export function orderAgain(data) { export function orderAgain(data) {
return request.post('user/cart/again', data); return request.post('user/cart/again', data);
} }
/** /**
@ -165,7 +165,7 @@ export function orderAgain(data) {
* *
*/ */
export function orderTake(uni) { export function orderTake(uni) {
return request.post('order/take/' + uni); return request.post('order/take/' + uni);
} }
/** /**
@ -174,7 +174,7 @@ export function orderTake(uni) {
* *
*/ */
export function otherOrderTake(uni) { export function otherOrderTake(uni) {
return request.post('other_order/take/' + uni); return request.post('other_order/take/' + uni);
} }
@ -183,21 +183,21 @@ export function otherOrderTake(uni) {
* @returns {*} * @returns {*}
*/ */
export function express(id) { export function express(id) {
return request.post("order/express/" + id); return request.post("order/express/" + id);
} }
/** /**
* 退款单查询物流信息 * 退款单查询物流信息
* @returns {*} * @returns {*}
*/ */
export function refundOrderExpress(merId, id) { export function refundOrderExpress(merId, id) {
return request.get(`server/${merId}/refund/express/${id}`); return request.get(`server/${merId}/refund/express/${id}`);
} }
/** /**
* 获取退款理由 * 获取退款理由
* *
*/ */
export function ordeRefundReason() { export function ordeRefundReason() {
return request.get('order/refund/reason'); return request.get('order/refund/reason');
} }
/** /**
@ -205,7 +205,7 @@ export function ordeRefundReason() {
* @param object data * @param object data
*/ */
export function orderRefundVerify(data) { export function orderRefundVerify(data) {
return request.post('order/refund/verify', data); return request.post('order/refund/verify', data);
} }
/** /**
@ -213,14 +213,14 @@ export function orderRefundVerify(data) {
* @param string cartId * @param string cartId
*/ */
export function orderConfirm(data) { export function orderConfirm(data) {
return request.post('order/check', data); return request.post('order/check', data);
} }
/** /**
* 订单确认获取订单详细信息 * 订单确认获取订单详细信息
* @param string cartId * @param string cartId
*/ */
export function getOrderConfirm(data) { export function getOrderConfirm(data) {
return request.post('v2/order/check', data); return request.post('v2/order/check', data);
} }
/** /**
* 获取当前金额能使用的优惠卷 * 获取当前金额能使用的优惠卷
@ -228,7 +228,7 @@ export function getOrderConfirm(data) {
* *
*/ */
export function getCouponsOrderPrice(price, data) { export function getCouponsOrderPrice(price, data) {
return request.get('coupons/order/' + price, data) return request.get('coupons/order/' + price, data)
} }
@ -240,86 +240,110 @@ export function getCouponsOrderPrice(price, data) {
* @returns {*} * @returns {*}
*/ */
export function postOrderComputed(key, data) { export function postOrderComputed(key, data) {
return request.post("/order/computed/" + key, data); return request.post("/order/computed/" + key, data);
} }
// 生成订单 // 生成订单
export function orderCreate(data) { export function orderCreate(data) {
return request.post("order/create", data, { noAuth: true }); return request.post("order/create", data, {
noAuth: true
});
} }
// 新的生成订单 // 新的生成订单
export function createOrder(data) { export function createOrder(data) {
return request.post("v2/order/create", data, { noAuth: true }); return request.post("v2/order/create", data, {
noAuth: true
});
} }
// 生成其他订单 // 生成其他订单
export function createOtherOrder(data) { export function createOtherOrder(data) {
return request.post("other_order/create", data); return request.post("other_order/create", data);
} }
// 未支付订单 // 未支付订单
export function groupOrderList(data) { export function groupOrderList(data) {
return request.get("order/group_order_list", data, { noAuth: true }); return request.get("order/group_order_list", data, {
noAuth: true
});
} }
// 批量退款列表 // 批量退款列表
export function refundBatch(id) { export function refundBatch(id) {
return request.get("refund/batch_product/" + id, { noAuth: true }); return request.get("refund/batch_product/" + id, {
noAuth: true
});
} }
// 退款商品 // 退款商品
export function refundProduct(id, data) { export function refundProduct(id, data) {
return request.get("refund/product/" + id, data, { noAuth: true }); return request.get("refund/product/" + id, data, {
noAuth: true
});
} }
// 申请退款 // 申请退款
export function refundApply(id, data) { export function refundApply(id, data) {
return request.post("refund/apply/" + id, data, { noAuth: true }); return request.post("refund/apply/" + id, data, {
noAuth: true
});
} }
// 退款理由 // 退款理由
export function refundMessage() { export function refundMessage() {
return request.get("common/refund_message", { noAuth: true }); return request.get("common/refund_message", {
noAuth: true
});
} }
// 退款列表 // 退款列表
export function refundList(data) { export function refundList(data) {
return request.get("refund/list", data, { noAuth: true }); return request.get("refund/list", data, {
noAuth: true
});
} }
// 退款详情 // 退款详情
export function refundDetail(id) { export function refundDetail(id) {
return request.get("refund/detail/" + id, { noAuth: true }); return request.get("refund/detail/" + id, {
noAuth: true
});
} }
// 物流列表 // 物流列表
export function expressList() { export function expressList() {
return request.get("common/express"); return request.get("common/express");
} }
// 退回商品提交 // 退回商品提交
export function refundBackGoods(id, data) { export function refundBackGoods(id, data) {
return request.post("refund/back_goods/" + id, data, { noAuth: true }); return request.post("refund/back_goods/" + id, data, {
noAuth: true
});
} }
// 退款记录删除 // 退款记录删除
export function refundDel(id) { export function refundDel(id) {
return request.post("refund/del/" + id, { noAuth: true }); return request.post("refund/del/" + id, {
noAuth: true
});
} }
// 退款记录删除 // 退款记录删除
export function refundExpress(id) { export function refundExpress(id) {
return request.get("refund/express/" + id, { noAuth: true }); return request.get("refund/express/" + id, {
noAuth: true
});
} }
// 核销二维码 // 核销二维码
export function verifyCode(id) { export function verifyCode(id) {
return request.get("order/verify_code/" + id); return request.get("order/verify_code/" + id);
} }
/** /**
* 预售尾款支付 * 预售尾款支付
* @param object data * @param object data
*/ */
export function presellOrderPay(id, data) { export function presellOrderPay(id, data) {
return request.post('presell/pay/' + id, data); return request.post('presell/pay/' + id, data);
} }
/** /**
@ -327,42 +351,44 @@ export function presellOrderPay(id, data) {
* @param object data * @param object data
*/ */
export function receiptOrder(data) { export function receiptOrder(data) {
return request.get('user/receipt/order', data); return request.get('user/receipt/order', data);
} }
/** /**
* 发票订单 * 发票订单
* @param object data * @param object data
*/ */
export function getReceiptOrder(id) { export function getReceiptOrder(id) {
return request.get('user/receipt/order/' + id); return request.get('user/receipt/order/' + id);
} }
/** /**
* 发票订单 * 发票订单
* @param object data * @param object data
*/ */
export function getCallBackUrlApi(key) { export function getCallBackUrlApi(key) {
return request.get('common/pay_key/' + key, {}, { noAuth: true }); return request.get('common/pay_key/' + key, {}, {
noAuth: true
});
} }
/** /**
* 发票订单 * 发票订单
* @param object data * @param object data
*/ */
export function develiveryDetail(id) { export function develiveryDetail(id) {
return request.get(`order/delivery/${id}`); return request.get(`order/delivery/${id}`);
} }
/** /**
* 订单申请开票 * 订单申请开票
* @param object data * @param object data
*/ */
export function applyInvoiceApi(id, data) { export function applyInvoiceApi(id, data) {
return request.post(`order/receipt/${id}`, data); return request.post(`order/receipt/${id}`, data);
} }
/** /**
* 退款单取消申请 * 退款单取消申请
* @param object data * @param object data
*/ */
export function refundCancelApi(id) { export function refundCancelApi(id) {
return request.post(`refund/cancel/${id}`); return request.post(`refund/cancel/${id}`);
} }
/** /**
@ -370,5 +396,13 @@ export function refundCancelApi(id) {
* @param object data * @param object data
*/ */
export function refundlist(data) { export function refundlist(data) {
return request.get(`refund/list`,data); return request.get(`refund/list`, data);
}
/**
* 售后
* @param object data
*/
export function uploadVoucherApi(data) {
return request.get(`other_order/upload/:${data.id}`, data);
} }

View File

@ -385,7 +385,8 @@
orderTake, orderTake,
otherOrderTake, otherOrderTake,
applyInvoiceApi, applyInvoiceApi,
refundList refundList,
uploadVoucherApi
} from '@/api/order.js'; } from '@/api/order.js';
import { import {
getUserInfo getUserInfo
@ -669,7 +670,20 @@
uploadVoucher(item) { uploadVoucher(item) {
let that = this; let that = this;
that.$util.uploadImageOne('upload/image', res => { that.$util.uploadImageOne('upload/image', res => {
const path = res.data.path; uni.showLoading({
title: "上传中..."
})
uploadVoucherApi({
id: item.order_id,
url: res.data.path
}).then(res => {
uni.hideLoading();
this.$util.Tips({
title: "上传成功"
})
}).catch(() => {
uni.hideLoading();
})
}); });
}, },