diff --git a/public/img/product-image.svg b/public/img/product-image.svg new file mode 100644 index 0000000..f12a898 --- /dev/null +++ b/public/img/product-image.svg @@ -0,0 +1,6 @@ + + + 空闲 + \ No newline at end of file diff --git a/src/views/cabinet/cabinet-cell/cell-edit-modal.vue b/src/views/cabinet/cabinet-cell/cell-edit-modal.vue index 7537c76..e0eff53 100644 --- a/src/views/cabinet/cabinet-cell/cell-edit-modal.vue +++ b/src/views/cabinet/cabinet-cell/cell-edit-modal.vue @@ -1,8 +1,8 @@ + + + + \ No newline at end of file diff --git a/src/views/cabinet/smart-cabinet-card/detail.vue b/src/views/cabinet/smart-cabinet-card/detail.vue index bd7742c..9d6aac8 100644 --- a/src/views/cabinet/smart-cabinet-card/detail.vue +++ b/src/views/cabinet/smart-cabinet-card/detail.vue @@ -9,6 +9,7 @@ import GatewayConfigModal from "@/views/cabinet/smart-cabinet/GatewayConfigModal import ShopConfigModal from "@/views/cabinet/smart-cabinet/ShopConfigModal.vue"; import MainCabinetConfigModal from "@/views/cabinet/smart-cabinet/MainCabinetConfigModal.vue"; import CabinetGoodsConfigModal from "@/views/shop/cabinet-goods/cabinet-goods-config-modal.vue"; +import ConfiguredGoodsModal from "./configured-goods-modal.vue"; import { ElMessage, ElMessageBox } from "element-plus"; const { VITE_PUBLIC_IMG_PATH: IMG_PATH } = import.meta.env; import EditPen from "@iconify-icons/ep/edit-pen"; @@ -54,18 +55,24 @@ const searchCellParams = ref({ goodsName: null }); const cellPagination = ref({ - pageSize: 5, + pageSize: 18, currentPage: 1, total: 0 }); const goodsConfigVisible = ref(false); +const configuredGoodsVisible = ref(false); const currentCellId = ref(); const cellFormVisible = ref(false); const cellEditVisible = ref(false); function handleConfigure(row: CabinetCellDTO) { - currentCellId.value = row.cellId; - goodsConfigVisible.value = true; + if (row.goodsId) { + currentCell.value = row; + configuredGoodsVisible.value = true; + } else { + currentCellId.value = row.cellId; + goodsConfigVisible.value = true; + } } async function handleStockConfig(row: CabinetCellDTO) { @@ -259,7 +266,8 @@ onMounted(() => { {{ cabinetInfo.cabinetName }} {{ getModeText(cabinetInfo.mode) }} - {{ CabinetImgMap[cabinetInfo.templateNo]?.name || '-' }} + {{ CabinetImgMap[cabinetInfo.templateNo]?.name || '-' + }} {{ cabinetInfo.usedCells || '0' }} {{ cabinetInfo.availableCells || '0' }} {{ cabinetInfo.shopName || '-' }} @@ -285,17 +293,17 @@ onMounted(() => { {{ cabinetInfo.cabinetName || '-' }} {{ getModeText(cabinetInfo.mode) }} {{ CabinetImgMap[cabinetInfo.templateNo]?.name || '-' - }} + }} {{ cabinetInfo.shopName || '-' }} 配置 {{ cabinetInfo.mqttServerId || '-' }} - + 配置 - {{ getBalanceEnableText(cabinetInfo.balanceEnable) }} + {{ getBalanceEnableText(cabinetInfo.balanceEnable) + }} @@ -314,74 +322,48 @@ onMounted(() => { 搜索 - - - 重置 - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
+ +
+
格口号: {{ item.cellNo }}
+
{{ item.goodsId ? item.goodsName : '未配置商品' }}
+
价格: {{ item.price }}
+
库存: {{ item.stock }}
+
类型: {{ switchCellType(item.cellType) }}
+
+
+
+ + 商品配置 + + + 编辑格口 + + +
+
+
+
@@ -418,6 +400,11 @@ onMounted(() => { + + + @@ -429,6 +416,65 @@ onMounted(() => {