63 lines
2.2 KiB
Vue
63 lines
2.2 KiB
Vue
<script setup lang="ts">
|
|
import { ref, reactive } from "vue";
|
|
import { onLoad, onShow } from "@dcloudio/uni-app";
|
|
import { isEmpty } from 'radash'
|
|
|
|
import { hooks, router } from "@@/index"
|
|
import { applyApi } from "@@/api"
|
|
|
|
|
|
const state = reactive<any>({
|
|
pa: {
|
|
id: null,
|
|
pagesize: 99,
|
|
},
|
|
})
|
|
|
|
const pageRef = ref<any>(null)
|
|
const pageHook = hooks.usePage(pageRef, applyApi.foreignItems, null, 'data')
|
|
const query = (page: number, pagesize: number) => {
|
|
pageHook.startPage(page, pagesize, false, state.pa);
|
|
}
|
|
|
|
onLoad((options: any) => {
|
|
if (!isEmpty(options.id)) {
|
|
state.pa.id = options.id
|
|
}
|
|
});
|
|
onShow(() => {
|
|
if (pageRef.value) {
|
|
pageRef.value.reload(false)
|
|
}
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<crud-layout title="外来人员就餐" bg="/static/page/blue-bg.png">
|
|
<z-paging ref="pageRef" height="100%" :fixed="false" v-model="pageHook.list" :default-page-size="5"
|
|
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">
|
|
<template #top>
|
|
<view class="h-30rpx" />
|
|
</template>
|
|
<view class="flex-row items-center justify-between card p-x-20rpx p-y-30rpx m-b-20rpx"
|
|
v-for="(v, i) in pageHook.list" :key="i" @tap="hooks.usePreviewImage(v.code)">
|
|
<view class="flex-row items-center">
|
|
<view class="flex-row items-center">
|
|
<tm-tag v-if="v.status == 1" size="m" color="info">未使用</tm-tag>
|
|
<tm-tag v-if="v.status == 2" size="m" color="success">已使用</tm-tag>
|
|
</view>
|
|
<view class="flex-row items-center sub-text-28">
|
|
<text class="m-l-30rpx">{{ v.userNameStr }}</text>
|
|
<text class="m-l-30rpx">{{ v.userMobile }}</text>
|
|
</view>
|
|
</view>
|
|
<view class="iconfont icon-erweima font-size-40rpx! color-blue" />
|
|
</view>
|
|
</z-paging>
|
|
</crud-layout>
|
|
</template>
|
|
|
|
<style lang="scss" scoped></style> |