智能柜管理修改
This commit is contained in:
1 parent
821ea79a3f
commit
2012f8a945
2 files changed
+42
-17
No files matched your search
@@ -19,12 +19,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-descriptions-item label="商户名称:">{{}}</el-descriptions-item>
|
<el-descriptions-item label="商户名称:">{{}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="设备编号:">{{ doorSettingData.id }}</el-descriptions-item>
|
<el-descriptions-item label="设备编号:">{{ doorSettingData.deviceCode }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="设备名称:">{{}}</el-descriptions-item>
|
<el-descriptions-item label="设备名称:">{{ doorSettingData.hardName }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="机器编号:">{{}}</el-descriptions-item>
|
<el-descriptions-item label="机器编号:">{{ doorSettingData.imei }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="外部设备编号:">{{}}</el-descriptions-item>
|
<el-descriptions-item label="外部设备编号:">{{}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="SIM卡号:">{{}}</el-descriptions-item>
|
<el-descriptions-item label="SIM卡号:">{{ doorSettingData.simSn }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="柜子层数:">{{}}</el-descriptions-item>
|
<el-descriptions-item label="柜子层数:">{{ doorSettingData.doorCount }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="地址:">{{}}</el-descriptions-item>
|
<el-descriptions-item label="地址:">{{}}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
@@ -34,10 +34,10 @@
|
|||||||
<el-button icon="Edit" type="primary" @click="doVolumeSetting">音量设置</el-button>
|
<el-button icon="Edit" type="primary" @click="doVolumeSetting">音量设置</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<el-descriptions-item label="销售状态:">{{}}</el-descriptions-item>
|
<el-descriptions-item label="销售状态:">{{ doorSettingData.saleStatus }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="设备状态:">{{}}</el-descriptions-item>
|
<el-descriptions-item label="设备状态:">{{}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="电源状态:">{{}}</el-descriptions-item>
|
<el-descriptions-item label="电源状态:">{{ doorSettingData.powerStatus }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="网络状态:">{{}}</el-descriptions-item>
|
<el-descriptions-item label="网络状态:">{{ doorSettingData.netStatus }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="媒体音量:">{{ doorSettingData.mediaVolume }}</el-descriptions-item>
|
<el-descriptions-item label="媒体音量:">{{ doorSettingData.mediaVolume }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="系统音量:">{{ doorSettingData.systemVolume }}</el-descriptions-item>
|
<el-descriptions-item label="系统音量:">{{ doorSettingData.systemVolume }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
@@ -51,7 +51,12 @@
|
|||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
<el-tabs type="border-card">
|
<el-tabs type="border-card">
|
||||||
<el-tab-pane label="114514-1">
|
<el-tab-pane
|
||||||
|
v-if="doorSettingData.cabinetList?.length"
|
||||||
|
:label="doorSettingData.deviceCode + '-' + item.cabinetNo"
|
||||||
|
v-for="(item, index) in doorSettingData.cabinetList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
<div v-for="(floorItem, floorIndex) in state.doorGoods" :key="floorIndex">
|
<div v-for="(floorItem, floorIndex) in state.doorGoods" :key="floorIndex">
|
||||||
<el-divider />
|
<el-divider />
|
||||||
<div class="text-black flex items-center">
|
<div class="text-black flex items-center">
|
||||||
@@ -79,7 +84,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="114514-2">22</el-tab-pane>
|
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -100,6 +104,7 @@ import { useMessage } from "/@/hooks/message"
|
|||||||
import { displayPrice } from "/@/utils/formatMoney"
|
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 } from "/@/api/hard/hard-spu"
|
||||||
|
|
||||||
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"))
|
||||||
@@ -108,6 +113,8 @@ const GoodsPutaway = defineAsyncComponent(() => import("./goods-putaway.vue"))
|
|||||||
const { query } = useRoute()
|
const { query } = useRoute()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const doorSettingData = ref<any>({})
|
const doorSettingData = ref<any>({})
|
||||||
|
const cabinetData = ref<any>([])
|
||||||
|
const currentCabinet = ref(0)
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
mediaVolume: "",
|
mediaVolume: "",
|
||||||
systemVolume: "",
|
systemVolume: "",
|
||||||
@@ -120,8 +127,10 @@ const goodsPutawayRef = ref()
|
|||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getDetail()
|
await getDetail()
|
||||||
|
await getCabinet()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 获取柜子详情
|
||||||
const getDetail = async () => {
|
const getDetail = async () => {
|
||||||
const id = query.id as unknown as any
|
const id = query.id as unknown as any
|
||||||
if (!id) return useMessage().error("设备id不存在")
|
if (!id) return useMessage().error("设备id不存在")
|
||||||
@@ -129,13 +138,27 @@ const getDetail = async () => {
|
|||||||
|
|
||||||
const { data: orderData } = await hardDoorManager.getByHardId({ hardId: id })
|
const { data: orderData } = await hardDoorManager.getByHardId({ hardId: id })
|
||||||
if (orderData) {
|
if (orderData) {
|
||||||
doorSettingData.value = orderData
|
doorSettingData.value = { ...orderData, cabinetList: JSON.parse(orderData.cabinetList) }
|
||||||
}
|
}
|
||||||
if (!doorSettingData.value.hardId) {
|
if (!doorSettingData.value.hardId) {
|
||||||
doorSettingData.value.hardId = id
|
doorSettingData.value.hardId = id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getCabinet = async (cabinetIndex: number = 0) => {
|
||||||
|
console.log(doorSettingData.value.cabinetList)
|
||||||
|
|
||||||
|
if (!doorSettingData.value.hardId) return useMessage().error("设备id不存在")
|
||||||
|
if (!doorSettingData.value.cabinetList?.length) return useMessage().error("设备空间不存在")
|
||||||
|
const { data } = await getByCabinetNo({
|
||||||
|
hardId: doorSettingData.value.hardId,
|
||||||
|
cabinetNo: doorSettingData.value.cabinetList[cabinetIndex].cabinetNo,
|
||||||
|
})
|
||||||
|
if (data) {
|
||||||
|
cabinetData.value = data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 绑定信息
|
// 绑定信息
|
||||||
const doBind = async () => {
|
const doBind = async () => {
|
||||||
if (infoSettingRef.value) {
|
if (infoSettingRef.value) {
|
||||||
@@ -148,7 +171,7 @@ const refreshInfo = () => {}
|
|||||||
// 音量设置
|
// 音量设置
|
||||||
const doVolumeSetting = async () => {
|
const doVolumeSetting = async () => {
|
||||||
if (volumeSettingRef.value) {
|
if (volumeSettingRef.value) {
|
||||||
volumeSettingRef.value.openDialog(doorSettingData.value.hardId)
|
volumeSettingRef.value.openDialog(doorSettingData.value.hardId, doorSettingData.value.mediaVolume, doorSettingData.value.systemVolume)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const refreshVolume = (data: { hardId: string; mediaVolume: number; systemVolume: number }) => {
|
const refreshVolume = (data: { hardId: string; mediaVolume: number; systemVolume: number }) => {
|
||||||
|
|||||||
@@ -36,14 +36,16 @@ const form = reactive<{
|
|||||||
systemVolume: number
|
systemVolume: number
|
||||||
}>({
|
}>({
|
||||||
hardId: "",
|
hardId: "",
|
||||||
mediaVolume: 80,
|
mediaVolume: 0,
|
||||||
systemVolume: 80,
|
systemVolume: 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
const openDialog = (id: string) => {
|
const openDialog = (hardId: string, mediaVolume: number, systemVolume: number) => {
|
||||||
if (!id) return useMessage().warning("设备id不存在")
|
if (!hardId) return useMessage().warning("设备id不存在")
|
||||||
|
form.hardId = hardId
|
||||||
|
form.mediaVolume = mediaVolume
|
||||||
|
form.systemVolume = systemVolume
|
||||||
visible.value = true
|
visible.value = true
|
||||||
form.hardId = id
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
|
|||||||
Reference in new issue
Block a user