智能柜修改
This commit is contained in:
1 parent
0697efa03f
commit
3f76ddb20c
2 files changed
+53
-11
No files matched your search
@@ -28,7 +28,7 @@ export function openAccess(data?: { hardDoorId: any; cabinetNo: any }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检修开门
|
* 检修关门
|
||||||
* @param hardDoorId 柜子编号
|
* @param hardDoorId 柜子编号
|
||||||
* @param cabinetNo 货柜编号
|
* @param cabinetNo 货柜编号
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -67,7 +67,20 @@
|
|||||||
|
|
||||||
<el-descriptions :column="3" title="货柜信息" border>
|
<el-descriptions :column="3" title="货柜信息" border>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<el-button icon="CircleCheck" type="primary" @click="checkOpenAccess">检修开门</el-button>
|
<el-space>
|
||||||
|
<el-button icon="CircleCheck" type="primary" @click="checkOpenAccess" :disabled="checkCloseLoading" :loading="checkOpenLoading">
|
||||||
|
检修开门
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
icon="CircleClose"
|
||||||
|
type="primary"
|
||||||
|
@click="checkCloseAccess"
|
||||||
|
:disabled="checkOpenLoading"
|
||||||
|
:loading="checkCloseLoading"
|
||||||
|
>
|
||||||
|
检修关门
|
||||||
|
</el-button>
|
||||||
|
</el-space>
|
||||||
</template>
|
</template>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-tabs type="border-card" @tab-click="doorTabClick">
|
<el-tabs type="border-card" @tab-click="doorTabClick">
|
||||||
@@ -174,7 +187,7 @@ import { displayPrice } from "/@/utils/formatMoney"
|
|||||||
import * as hardDoorManager from "/@/api/hard/hard-door-manager"
|
import * as hardDoorManager from "/@/api/hard/hard-door-manager"
|
||||||
import { ElMessageBox } from "element-plus"
|
import { ElMessageBox } from "element-plus"
|
||||||
import { getByCabinetNo, unPutaway } from "/@/api/hard/hard-spu"
|
import { getByCabinetNo, unPutaway } from "/@/api/hard/hard-spu"
|
||||||
import { openAccess } from "/@/api/hard/hard-door-manager"
|
import { closeAccess, openAccess } from "/@/api/hard/hard-door-manager"
|
||||||
|
|
||||||
const InfoSetting = defineAsyncComponent(() => import("./info-setting.vue"))
|
const InfoSetting = defineAsyncComponent(() => import("./info-setting.vue"))
|
||||||
const VolumeSetting = defineAsyncComponent(() => import("./volume-setting.vue"))
|
const VolumeSetting = defineAsyncComponent(() => import("./volume-setting.vue"))
|
||||||
@@ -182,6 +195,8 @@ const GoodsPutaway = defineAsyncComponent(() => import("./goods-putaway.vue"))
|
|||||||
|
|
||||||
const { query } = useRoute()
|
const { query } = useRoute()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
const checkOpenLoading = ref(false)
|
||||||
|
const checkCloseLoading = ref(false)
|
||||||
const infoSettingRef = ref()
|
const infoSettingRef = ref()
|
||||||
const volumeSettingRef = ref()
|
const volumeSettingRef = ref()
|
||||||
const goodsPutawayRef = ref()
|
const goodsPutawayRef = ref()
|
||||||
@@ -245,15 +260,42 @@ const refreshVolume = (data: { hardId: string; mediaVolume: number; systemVolume
|
|||||||
|
|
||||||
// 检修开门
|
// 检修开门
|
||||||
const checkOpenAccess = async () => {
|
const checkOpenAccess = async () => {
|
||||||
const res = await openAccess({
|
try {
|
||||||
hardDoorId: state.hardId,
|
checkOpenLoading.value = true
|
||||||
cabinetNo: state.deviceDetail.cabinetList[state.curActivedDoorTabIndex].cabinetNo,
|
const res = await openAccess({
|
||||||
})
|
hardDoorId: state.hardId,
|
||||||
if (res.code == 0) {
|
cabinetNo: state.deviceDetail.cabinetList[state.curActivedDoorTabIndex].cabinetNo,
|
||||||
useMessage().success("操作成功")
|
})
|
||||||
return
|
if (res.code == 0) {
|
||||||
|
useMessage().success("操作成功")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
useMessage().error(res.msg || "操作失败")
|
||||||
|
} catch (error: any) {
|
||||||
|
useMessage().error(error)
|
||||||
|
} finally {
|
||||||
|
checkOpenLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检修关门
|
||||||
|
const checkCloseAccess = async () => {
|
||||||
|
try {
|
||||||
|
checkCloseLoading.value = true
|
||||||
|
const res = await closeAccess({
|
||||||
|
hardDoorId: state.hardId,
|
||||||
|
cabinetNo: state.deviceDetail.cabinetList[state.curActivedDoorTabIndex].cabinetNo,
|
||||||
|
})
|
||||||
|
if (res.code == 0) {
|
||||||
|
useMessage().success("操作成功")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
useMessage().error(res.msg || "操作失败")
|
||||||
|
} catch (error: any) {
|
||||||
|
useMessage().error(error)
|
||||||
|
} finally {
|
||||||
|
checkCloseLoading.value = false
|
||||||
}
|
}
|
||||||
useMessage().error(res.msg || "操作失败")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 点击柜门tab
|
// 点击柜门tab
|
||||||
|
|||||||
Reference in new issue
Block a user