70 lines
2.2 KiB
Vue
70 lines
2.2 KiB
Vue
<template>
|
|
<crud-layout bg="/static/page/blue-bg.png">
|
|
<z-paging
|
|
ref="pageRef"
|
|
height="100%"
|
|
:fixed="false"
|
|
v-model="pageHook.list"
|
|
:default-page-size="10"
|
|
safe-area-inset-bottom
|
|
:loading-more-enabled="true"
|
|
:show-scrollbar="false"
|
|
@query="query"
|
|
:auto-clean-list-when-reload="false"
|
|
:auto-scroll-to-top-when-reload="false"
|
|
@scroll="pageHook.scroll"
|
|
>
|
|
<view class="h-30rpx" />
|
|
<tm-sheet v-for="(item, index) in pageHook.list" :key="index" :margin="[0, 20]">
|
|
<tm-text font-size="32">{{ item.hardName }} {{ item.deviceCode }}</tm-text>
|
|
<view class="card flex justify-around items-center my-1 p-2">
|
|
<view class="flex-col items-center p-2 rounded-1 active:bg-#E8E8E8" @click="doDetail(item.hardId)">
|
|
<image class="w-50 h-50" src="@/static/page/货柜详情.svg" />
|
|
<tm-text>货柜详情</tm-text>
|
|
</view>
|
|
<view class="flex-col items-center p-2 rounded-1 active:bg-#E8E8E8" @click="replenishment(item.hardId)">
|
|
<image class="w-50 h-50" src="@/static/page/开门.svg" />
|
|
<tm-text>货柜补货</tm-text>
|
|
</view>
|
|
<view class="flex-col items-center p-2 rounded-1 active:bg-#E8E8E8" @click="openPutaway(item.hardId)">
|
|
<image class="w-50 h-50" src="@/static/page/货柜上架.svg" />
|
|
<tm-text>商品上架</tm-text>
|
|
</view>
|
|
</view>
|
|
</tm-sheet>
|
|
</z-paging>
|
|
</crud-layout>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ref } from "vue"
|
|
import { hooks, router } from "@/sheep"
|
|
import { doorApi } from "@/sheep/api"
|
|
|
|
const pageRef = ref<any>(null)
|
|
|
|
const pageHook = hooks.usePage(pageRef, doorApi.hardDoorPage, null, "data.records")
|
|
|
|
const query = (page: number, pagesize: number) => {
|
|
pageHook.startPage(page, pagesize, false, {})
|
|
}
|
|
|
|
// 货柜详情
|
|
const doDetail = (hardDoorId: string) => {
|
|
if (!hardDoorId) return
|
|
router.jump("/pages/cabinet/cabinetDetail", { hardDoorId }, 1)
|
|
}
|
|
|
|
// 商品补货
|
|
const replenishment = (hardDoorId: string) => {
|
|
if (!hardDoorId) return
|
|
router.jump("/pages/cabinet/replenishment", { hardDoorId }, 1)
|
|
}
|
|
|
|
// 商品上架
|
|
const openPutaway = (hardDoorId: string) => {
|
|
if (!hardDoorId) return
|
|
router.jump("/pages/cabinet/putaway", { hardDoorId }, 1)
|
|
}
|
|
</script>
|