This commit is contained in:
chen-xin-zhi 2025-03-04 16:33:49 +08:00
parent 536c0ff19f
commit 8159296f3c

View File

@ -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;
/* 设置字体 */
}
</style>