diff --git a/src/views/hard/hard-door-manager/goods-putaway.vue b/src/views/hard/hard-door-manager/goods-putaway.vue index cefccd7..2f20880 100644 --- a/src/views/hard/hard-door-manager/goods-putaway.vue +++ b/src/views/hard/hard-door-manager/goods-putaway.vue @@ -21,10 +21,7 @@ border :cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle" - @selection-change="selectionChangHandle" - @sort-change="sortChangeHandle" > - @@ -76,15 +73,14 @@ - 点击上架 + 点击上架 - 取消 - 确认上架 + 关闭 @@ -96,45 +92,45 @@ import { useDict } from "/@/hooks/dict" import { displayPrice } from "/@/utils/formatMoney" import { useMessage } from "/@/hooks/message" +const emit = defineEmits(["refreshDoor"]) + const { yes_no_type, hard_ks_sku_type } = useDict("yes_no_type", "hard_ks_sku_type") const queryRef = ref() -const selectObjs = ref([]) as any -const multiple = ref(false) const visible = ref(false) -const loading = ref(false) const state: BasicTableProps = reactive({ queryForm: {}, pageList: hardSpu.pageJoin, }) +const curPos = reactive<{ + hardId: string + floorIndex: number | undefined + posIndex: number | undefined +}>({ hardId: "", floorIndex: undefined, posIndex: undefined }) -const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, tableStyle } = useTable(state) - -// 多选事件 -const selectionChangHandle = (objs: { id: string }[]) => { - selectObjs.value = objs.map(({ id }) => id) - multiple.value = !objs.length -} +const { getDataList, currentChangeHandle, sizeChangeHandle, tableStyle } = useTable(state) const resetQuery = () => { - // 清空搜索条件 queryRef.value?.resetFields() - // 清空多选 - selectObjs.value = [] getDataList() } -const openDialog = async (id: string) => { - if (!id) return useMessage().error("设备id不存在") - visible.value = true +const openDialog = (hardId: string, floorIndex: number, posIndex: number) => { + if (!hardId) return useMessage().error("设备id不存在") resetQuery() + + curPos.hardId = hardId + curPos.floorIndex = floorIndex + curPos.posIndex = posIndex + + visible.value = true } // 确认上架 -const confirmPutaway = async () => {} - -// 确认选择 -const onConfirm = async () => {} +const confirmPutaway = (row: any) => { + emit("refreshDoor", row, curPos) + visible.value = false +} defineExpose({ openDialog, diff --git a/src/views/hard/hard-door-manager/index.vue b/src/views/hard/hard-door-manager/index.vue index 7d69c1e..340c83b 100644 --- a/src/views/hard/hard-door-manager/index.vue +++ b/src/views/hard/hard-door-manager/index.vue @@ -52,18 +52,19 @@ - + - 第 {{ index + 1 }} 层: + 第 {{ floorIndex + 1 }} 层: - - 点击上架 + + + 点击上架 + + {{ item.name }} @@ -80,17 +81,17 @@ - + -