feat:退款详情

This commit is contained in:
dzc committed 2025-01-09 13:02:54 +08:00
1 parent 1b31fe32f9
commit 4891ac46b2
4 files changed
+248 -9

No files matched your search

@@ -43,7 +43,7 @@ import { getObj, putObj } from "/@/api/wallet/wallet-setting"
const dataFormRef = ref();
const loading = ref(false)
// 提交表单数据
const form = reactive({
const form = reactive<any>({
id: undefined,
afterSaleRefundReasons: undefined,
afterSaleReturnReasons: undefined,
@@ -62,13 +62,12 @@ onMounted(() => {
const onSubmit = async () => {
const valid = await dataFormRef.value.validate().catch(() => { });
if (!valid) return false;
try {
loading.value = true;
const pa = {
...form,
payPrice: storePrice(form.payPrice),
bonusPrice: storePrice(form.bonusPrice),
afterSaleRefundReasons: form.afterSaleRefundReasons?.join(","),
afterSaleReturnReasons: form.afterSaleReturnReasons?.join(",")
}
await putObj(pa)
useMessage().success('修改成功');
@@ -85,7 +84,14 @@ const getwalletRechargePackageData = (id: string) => {
// 获取数据
loading.value = true
getObj(id).then((res: any) => {
Object.assign(form, res.data)
const data: any = res.data;
if (data.afterSaleRefundReasons) {
data.afterSaleRefundReasons = data.afterSaleRefundReasons?.split(",")
}
if (data.afterSaleReturnReasons) {
data.afterSaleReturnReasons = data.afterSaleReturnReasons?.split(",")
}
Object.assign(form, data)
}).finally(() => {
loading.value = false
})