From 7721f3d6d4be91953fd3266c0bf7a4d8ac5f4856 Mon Sep 17 00:00:00 2001
From: zhangrenyuan <18990852002@163.com>
Date: Wed, 22 Oct 2025 13:03:24 +0800
Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E7=99=BB=E5=BD=95=E6=8C=89?=
=?UTF-8?q?=E9=92=AE=E5=92=8C=E9=A2=84=E8=A7=88=E5=9B=BE=E7=89=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/previews/PreviewImage.vue | 147 +++++++++++++++++++++
.../moneyManage/receiveDetail/receiveDetail.vue | 41 +++++-
.../moneyManage/refundDetail/refundService.vue | 48 ++++++-
3 files changed, 224 insertions(+), 12 deletions(-)
create mode 100644 src/components/previews/PreviewImage.vue
diff --git a/src/components/previews/PreviewImage.vue b/src/components/previews/PreviewImage.vue
new file mode 100644
index 0000000..26b49ca
--- /dev/null
+++ b/src/components/previews/PreviewImage.vue
@@ -0,0 +1,147 @@
+
+
+
+
+
![]()
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/moneyManage/receiveDetail/receiveDetail.vue b/src/views/moneyManage/receiveDetail/receiveDetail.vue
index 9519978..d369b9e 100644
--- a/src/views/moneyManage/receiveDetail/receiveDetail.vue
+++ b/src/views/moneyManage/receiveDetail/receiveDetail.vue
@@ -697,7 +697,7 @@ const getlist = async () => {
receivedMarket: MarketNameForId(receivedMarket),
cashRoleId: cashRoleId,
paymentCurrency: payCurrencySelect,
- submitterMarket:receivedMarket
+ submitterMarket: receivedMarket
}
}
})
@@ -852,7 +852,7 @@ const handleAddForm = async () => {
paymentCurrency: CurrencyForId(addFormData.value.paymentCurrency) || '',
receivedMarket: MarketNameForId(addFormData.value.receivedMarket) || '',
paymentAmount: (addFormData.value.paymentAmount) * 100,
- submitterMarket:adminData.value.markets
+ submitterMarket: adminData.value.markets
}
})
if (result.code == 200) {
@@ -964,6 +964,35 @@ const customUpload = async (options) => {
ElMessage.error(`上传失败: ${error.msg || error.message || '网络异常'}`)
}
}
+
+// 预览图片函数
+
+const previewImage = (imageUrl) => {
+ // 使用 element-plus 的 el-image 组件实现图片预览功能
+ const imageElement = document.createElement('img');
+ imageElement.src = imageUrl;
+ imageElement.style.maxWidth = '80vw';
+ imageElement.style.maxHeight = '80vh';
+ const viewer = document.createElement('div');
+ viewer.style.position = 'fixed';
+ viewer.style.top = '0';
+ viewer.style.left = '0';
+ viewer.style.width = '100vw';
+ viewer.style.height = '100vh';
+ viewer.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
+ viewer.style.display = 'flex';
+ viewer.style.justifyContent = 'center';
+ viewer.style.alignItems = 'center';
+ viewer.style.zIndex = '9999';
+ viewer.style.overflow = 'auto';
+ viewer.appendChild(imageElement);
+ document.body.appendChild(viewer);
+ viewer.addEventListener('click', () => {
+ document.body.removeChild(viewer);
+ });
+};
+
+
//========= 客服新增 退款/撤回 相关 ===============
const refundFormData = ref({
@@ -991,16 +1020,16 @@ const submitRefund = async () => {
goodsName: refundFormData.value.goodsName, // 商品名称(必填)
goodNum: refundFormData.value.goodNum, // 商品数量(必填,默认0)
paymentCurrency: refundFormData.value.paymentCurrency, // 付款币种(必填)
- paymentAmount: (refundFormData.value.paymentAmount)*100, // 付款金额(必填)
+ paymentAmount: (refundFormData.value.paymentAmount) * 100, // 付款金额(必填)
receivedCurrency: refundFormData.value.receivedCurrency, // 到账币种(必填)
- receivedAmount: (refundFormData.value.receivedAmount)*100, // 到账金额(必填)
- handlingCharge: (refundFormData.value.handlingCharge)*100, // 手续费(可选)
+ receivedAmount: (refundFormData.value.receivedAmount) * 100, // 到账金额(必填)
+ handlingCharge: (refundFormData.value.handlingCharge) * 100, // 手续费(可选)
receivedMarket: refundFormData.value.receivedMarket, // 到账地区(可选)
payType: refundFormData.value.payType, // 支付方式(必填)
payTime: refundFormData.value.payTime, // 付款时间,格式:yyyy-MM-dd HH:mm:ss(可选)
receivedTime: refundFormData.value.receivedTime, // 到账时间,格式:yyyy-MM-dd HH:mm:ss(可选)
areaServise: adminData.value.adminName, // 提交人(可选)
- submitterId:adminData.value.id,
+ submitterId: adminData.value.id,
voucher: refundFormData.value.voucher, // 转账凭证URL(可选)
remark: refundFormData.value.remark, // 备注信息(可选)
refundReason: refundFormData.value.refundReason, // 退款备注-客服填写(可选)
diff --git a/src/views/moneyManage/refundDetail/refundService.vue b/src/views/moneyManage/refundDetail/refundService.vue
index 556f40b..1ccd383 100644
--- a/src/views/moneyManage/refundDetail/refundService.vue
+++ b/src/views/moneyManage/refundDetail/refundService.vue
@@ -67,12 +67,16 @@
-
-
-
- 无转账凭证
-
-
+
+
+
+
![转账凭证]()
+
+ 无转账凭证
+
+
@@ -390,6 +394,38 @@ const getMarket = async function () {
console.log('请求失败', error)
}
}
+
+// 预览图片函数
+const previewImage = (imageUrl) => {
+ // 使用 element-plus 的 el-image 组件实现图片预览功能
+ const imageElement = document.createElement('img');
+ imageElement.src = imageUrl;
+ imageElement.style.maxWidth = '80vw';
+ imageElement.style.maxHeight = '80vh';
+
+ const viewer = document.createElement('div');
+ viewer.style.position = 'fixed';
+ viewer.style.top = '0';
+ viewer.style.left = '0';
+ viewer.style.width = '100vw';
+ viewer.style.height = '100vh';
+ viewer.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
+ viewer.style.display = 'flex';
+ viewer.style.justifyContent = 'center';
+ viewer.style.alignItems = 'center';
+ viewer.style.zIndex = '9999';
+ viewer.style.overflow = 'auto';
+
+ viewer.appendChild(imageElement);
+ document.body.appendChild(viewer);
+
+ viewer.addEventListener('click', () => {
+ document.body.removeChild(viewer);
+ });
+};
+
+
+
const currencies = ref([
{
value: '新币',