diff --git a/src/api/shop/order.ts b/src/api/shop/order.ts index 4b939f8..4eee8e7 100644 --- a/src/api/shop/order.ts +++ b/src/api/shop/order.ts @@ -3,6 +3,8 @@ import { http } from "@/utils/http"; export interface OrderQuery extends BasePageQuery { /** 订单编号 */ orderId?: number; + /** 柜机id */ + cabinetId?: number; /** 格口id */ cellId?: number; /** diff --git a/src/views/cabinet/operation/index.vue b/src/views/cabinet/operation/index.vue index 65b6aff..05a7501 100644 --- a/src/views/cabinet/operation/index.vue +++ b/src/views/cabinet/operation/index.vue @@ -111,6 +111,7 @@ getList(); + diff --git a/src/views/cabinet/smart-cabinet/index.vue b/src/views/cabinet/smart-cabinet/index.vue index 78d5847..14e4b70 100644 --- a/src/views/cabinet/smart-cabinet/index.vue +++ b/src/views/cabinet/smart-cabinet/index.vue @@ -199,8 +199,7 @@ getList(); 编辑 - + 格口 -import { ref, watch } from "vue"; +import { ref, watch, onMounted } from "vue"; import { PureTableBar } from "@/components/RePureTableBar"; import { useRenderIcon } from "@/components/ReIcon/src/hooks"; import { getOrderListApi, exportOrderExcelApi, type OrderDTO, OrderQuery } from "@/api/shop/order"; +import { allCabinets, SmartCabinetDTO } from "@/api/cabinet/smart-cabinet"; import Search from "@iconify-icons/ep/search"; import Refresh from "@iconify-icons/ep/refresh"; import { ElMessage } from "element-plus"; @@ -15,8 +16,10 @@ const route = useRoute(); const formRef = ref(); const tableRef = ref(); +const cabinets = ref([]); const searchFormParams = ref({ + cabinetId: null, orderId: null, cellId: null, status: null, @@ -36,6 +39,15 @@ const pagination = ref({ const loading = ref(false); const dataList = ref([]); +onMounted(async () => { + const { data } = await allCabinets(); + cabinets.value = data; + if (data.length > 0) { + searchFormParams.value.cabinetId = data[0].cabinetId; + getList(); + } +}); + const getList = async () => { try { loading.value = true; @@ -107,125 +119,138 @@ getList();