From 8159296f3cc8bc1eb479b6b1a0e1edce02578fcc Mon Sep 17 00:00:00 2001 From: chen-xin-zhi <3588068430@qq.com> Date: Tue, 4 Mar 2025 16:33:49 +0800 Subject: [PATCH] Changes --- src/views/Orders/PendingServiceOrderList.vue | 22 ++++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/views/Orders/PendingServiceOrderList.vue b/src/views/Orders/PendingServiceOrderList.vue index a2d678a..641f184 100644 --- a/src/views/Orders/PendingServiceOrderList.vue +++ b/src/views/Orders/PendingServiceOrderList.vue @@ -214,8 +214,11 @@ const getOrderList = async () => { console.log(tableData.value) tableData.value.forEach((item: any) => { let total = 0; - for (var i = 0; i < item.pendingServiceOrderVOList.length; i++) { - total += item.pendingServiceOrderVOList[i].quantity; + for (var i = 0; i < item.pendingServiceOrderVOList.length; i ++ ) { + let tempItem = item.pendingServiceOrderVOList[i].orderItemStatus + if (tempItem !== '交易关闭' && tempItem !== '已退款') { + total += item.pendingServiceOrderVOList[i].quantity; + } } item.currentNumber = total }) @@ -265,18 +268,18 @@ const deliverGoods = async () => { //发货方法 } shipments.value = false; } -const refundOrder = async (row: any) => { //微信退款 +const refundOrder = async (row : any) => { //微信退款 loading.value = true - console.log('row-->', row) - const res = await myAxios.post('/wechat/refund/create', { id: row.orderItemId }) //传入订单号取消订单并退款 + console.log('row-------------------------------------------------------------------------------------------------------------------------------->',row) + const res = await myAxios.post('/wechat/refund/part/create', { id: row.orderItemId }) //传入订单号取消订单并退款 console.log(res) - setTimeout(() => { - if (res.data.code === 1) { + if(res.data.code === 1) { + setTimeout(() => { SuccessInfo('退款成功') getOrderList() loading.value = false - } - }, 2000) + }, 5000) + } } const reset = () => { //重置搜索框 goodId.value = '' @@ -318,4 +321,5 @@ const cancelOrder = async (row: any) => { //取消订单的方法(未支付能 font-family: 'Arial', sans-serif; /* 设置字体 */ } + \ No newline at end of file