|
|
@@ -0,0 +1,77 @@
|
|
|
+<template>
|
|
|
+ <z-paging ref="paging" v-model="list" bgColor="#f7f7f7" @query="query" safe-area-inset-bottom>
|
|
|
+ <template #top>
|
|
|
+ <ut-navbar title="种源库" :fixed="false"></ut-navbar>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <view class="pd3-24-24-0">
|
|
|
+ <view class="mb-20">
|
|
|
+ <ut-tabs mode="subsection" :tabs="tabs" v-model="form.queryType"></ut-tabs>
|
|
|
+ </view>
|
|
|
+ <view class="d-flex a-c bg-#f7f7f7">
|
|
|
+ <view class="min-w-170 flex1">
|
|
|
+ <ut-action-sheet v-model="form.queryType" :tabs="[{ label: '全部', value: '' }]" @change="onRefresh" title="选择原料类型">
|
|
|
+ <view class="d-flex search-select-item a-c">
|
|
|
+ <view class="flex1 ov-hd f-s-28 c-333 text-center f-w-5 w-s-no">{{ '全部' }} </view>
|
|
|
+ <up-icon size="24rpx" color="#333" name="arrow-down-fill" class="mr-5"></up-icon>
|
|
|
+ </view>
|
|
|
+ </ut-action-sheet>
|
|
|
+ </view>
|
|
|
+ <view class="h-86 pl-20 w-100%">
|
|
|
+ <ut-search ref="searchRef" v-model="form.keyword" @search="changeSeach" margin="0" :border="false" placeholder="搜名称、批号、库房、供应商" bgColor="#fff" height="86rpx" borderRadius="10rpx"></ut-search>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view></view>
|
|
|
+ </view>
|
|
|
+ <view class="pd-24 bg-#f7f7f7"> </view>
|
|
|
+
|
|
|
+ <template #empty>
|
|
|
+ <view class="d-flex flex-cln a-c" style="margin-top: -200rpx">
|
|
|
+ <ut-empty class="mg-at" color="#ccc" size="28rpx">暂无种源信息,点击下方+号新增吧</ut-empty>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </z-paging>
|
|
|
+</template>
|
|
|
+<script setup lang="ts">
|
|
|
+import { useClientRequest } from '@/utils/request';
|
|
|
+import { onShareAppMessage } from '@dcloudio/uni-app';
|
|
|
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
+const { pt_task_type } = toRefs<any>(proxy?.useDict('pt_task_type'));
|
|
|
+const list = ref<unknown[]>();
|
|
|
+const form = ref({ queryType: 'seed', keyword: '' });
|
|
|
+const paging = ref();
|
|
|
+const tabs = ref([
|
|
|
+ { label: '有库存', value: 'seed' },
|
|
|
+ { label: '无库存', value: 'seedling' },
|
|
|
+ { label: '种球', value: 'bulb' },
|
|
|
+]);
|
|
|
+
|
|
|
+const changeSeach = () => {
|
|
|
+ paging.value.reload();
|
|
|
+};
|
|
|
+const query = async (pageNum: number, pageSize: number) => {
|
|
|
+ const params = {
|
|
|
+ pageNum,
|
|
|
+ pageSize,
|
|
|
+ ...form.value,
|
|
|
+ };
|
|
|
+ const res = await useClientRequest.get('/plt-api/app/plantationTask/list', params);
|
|
|
+ if (res) {
|
|
|
+ const { rows } = res;
|
|
|
+ paging.value.complete(rows);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const onRefresh = () => {
|
|
|
+ paging.value.reload();
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.search-select-item {
|
|
|
+ height: 86rpx;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 12rpx;
|
|
|
+}
|
|
|
+</style>
|