diff --git a/src/components/PreviewImage/index.vue b/src/components/PreviewImage/index.vue
index a20361b..5b8a0b5 100644
--- a/src/components/PreviewImage/index.vue
+++ b/src/components/PreviewImage/index.vue
@@ -1,14 +1,21 @@
-
-
-
-
-
-
-
+
diff --git a/src/views/hard/hard-door-manager/index.vue b/src/views/hard/hard-door-manager/index.vue
index 79bdc7f..da69135 100644
--- a/src/views/hard/hard-door-manager/index.vue
+++ b/src/views/hard/hard-door-manager/index.vue
@@ -68,6 +68,7 @@
+ 刷新货柜二维码
检修开门
@@ -108,6 +109,15 @@
在售
停售
+
+
+
@@ -187,7 +197,7 @@ import { displayPrice } from "/@/utils/formatMoney"
import * as hardDoorManager from "/@/api/hard/hard-door-manager"
import { ElMessageBox } from "element-plus"
import { getByCabinetNo, unPutaway } from "/@/api/hard/hard-spu"
-import { closeAccess, openAccess } from "/@/api/hard/hard-door-manager"
+import { closeAccess, openAccess, refreshQrCode } from "/@/api/hard/hard-door-manager"
const InfoSetting = defineAsyncComponent(() => import("./info-setting.vue"))
const VolumeSetting = defineAsyncComponent(() => import("./volume-setting.vue"))
@@ -207,6 +217,8 @@ const state = reactive({
curActivedDoorTabIndex: 0,
curActivedTabIndex: 0,
})
+const hardDoorId = computed(() => state.deviceDetail.cabinetList?.[state.curActivedDoorTabIndex]?.hardDoorId)
+const cabinetNo = computed(() => state.deviceDetail.cabinetList?.[state.curActivedDoorTabIndex]?.cabinetNo)
onMounted(async () => {
await getDetail()
@@ -268,12 +280,27 @@ const refreshVolume = (data: { hardId: string; mediaVolume: number; systemVolume
state.deviceDetail.systemVolume = data.systemVolume
}
+// 刷新货柜收款二维码
+const refreshCabinetQrCode = async () => {
+ try {
+ const res = await refreshQrCode({ hardDoorId: hardDoorId.value, cabinetNo: cabinetNo.value })
+ if (res.code == 0) {
+ useMessage().success("刷新成功")
+ state.deviceDetail.cabinetList[state.curActivedDoorTabIndex].qrCode = res.data
+ } else {
+ useMessage().error(res.msg || "刷新失败")
+ }
+ } catch (error: any) {
+ useMessage().error(error.msg)
+ }
+}
+
// 检修开门
const checkOpenAccess = async () => {
try {
checkOpenLoading.value = true
const res = await openAccess({
- hardDoorId: state.hardId,
+ hardDoorId: hardDoorId.value,
cabinetNo: state.deviceDetail.cabinetList[state.curActivedDoorTabIndex].cabinetNo,
})
if (res.code == 0) {
@@ -293,7 +320,7 @@ const checkCloseAccess = async () => {
try {
checkCloseLoading.value = true
const res = await closeAccess({
- hardDoorId: state.hardId,
+ hardDoorId: hardDoorId.value,
cabinetNo: state.deviceDetail.cabinetList[state.curActivedDoorTabIndex].cabinetNo,
})
if (res.code == 0) {
diff --git a/src/views/mch/mch-manage/index.vue b/src/views/mch/mch-manage/index.vue
index e866d83..73ae09d 100644
--- a/src/views/mch/mch-manage/index.vue
+++ b/src/views/mch/mch-manage/index.vue
@@ -71,8 +71,7 @@
@@ -178,7 +177,6 @@ import { useDict } from "/@/hooks/dict"
import FormDialog from "./form.vue"
import Setting from "./setting.vue"
import { useUserInfo } from "/@/stores/userInfo"
-import { downBlobFile as downCollectionCodeBlobFile } from "/@/utils/other"
const { merchant_type, wallet_type, yes_no_type } = useDict("merchant_type", "wallet_type", "yes_no_type")
@@ -279,12 +277,6 @@ const handleDelete = async (ids: string[]) => {
useMessage().error(err.msg)
}
}
-
-// 点击二维码下载
-const downloadCollectionCode = (row: any) => {
- if (!row.collectionCode) return useMessage().error("二维码链接不存在")
- downCollectionCodeBlobFile(row.collectionCode, {}, `${row.name} 收款二维码.png`)
-}