优化订单退款

This commit is contained in:
gyq
2025-03-12 09:55:07 +08:00
parent 1e66b2ad1f
commit 48c9f24d4c
17 changed files with 191 additions and 16211 deletions

View File

@@ -93,6 +93,7 @@ import useStorage from '@/utils/useStorage.js'
import { useGlobal } from '@/store/global.js'
import { usePrint } from '@/store/print.js'
import { useGoods } from '@/store/goods.js'
import { useSocket } from '@/store/socket.js'
import { staffPermission } from '@/api/user.js'
@@ -102,8 +103,9 @@ const global = useGlobal()
const printStore = usePrint()
const store = useUser();
const socket = useSocket()
const emit = defineEmits("paySuccess");
const emits = defineEmits(['success']);
const cartInfo = ref('')
@@ -122,10 +124,6 @@ const props = defineProps({
type: String,
default: "",
},
orderInfo: {
type: Object,
default: "",
},
masterId: {
type: String,
default: "",
@@ -210,11 +208,13 @@ async function printOrderLable(isBefore = false) {
// 订单已支付
function paySuccess() {
emits('success')
dialogVisible.value = false;
ElMessage.success('支付成功')
printOrderLable()
useStorage.del('tableCode')
goodsStore.successClearCart(!cartList.length)
socket.cartInit()
goodsStore.successClearCart()
}