<template>
|
<view>
|
<wd-row>
|
<wd-col :span="21">
|
<wd-search placeholder-left hide-cancel></wd-search>
|
</wd-col>
|
<wd-col :span="3">
|
<view class="scan_box">
|
<wd-icon name="scan" size="24px" color="#0D867F"></wd-icon>
|
</view>
|
</wd-col>
|
</wd-row>
|
<wd-tabs v-model="tab" :lineWidth="110">
|
<block v-for="(item, index) in productList" :key="index" class="tab_bg">
|
<wd-tab :title="item.label">
|
<view class="card_box">
|
<Statistics class="statistics_box" />
|
<ProductCard v-for="(item, index) in 10" @click="toDetail(index)" />
|
<wd-loadmore custom-class="loadmore" state="loading" />
|
</view>
|
</wd-tab>
|
</block>
|
</wd-tabs>
|
</view>
|
</template>
|
|
<script lang="ts" setup>
|
import ProductCard from "@/components/product_card/index.vue";
|
import Statistics from "./components/Statistics.vue";
|
const tab = ref<number>(0);
|
|
const productList = ref<any[]>([
|
{
|
label: "待生产(10)",
|
},
|
{
|
label: "已生产(20)",
|
},
|
]);
|
|
const toDetail = (type: number) => {
|
if (Math.floor(type) % 2 === 0) {
|
uni.navigateTo({
|
url: "/pages/production/detail/wireDetail",
|
});
|
} else {
|
uni.navigateTo({
|
url: "/pages/production/detail/twistDetail",
|
});
|
}
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
::v-deep .wd-search__block {
|
border-radius: unset;
|
}
|
.scan_box {
|
padding: 6px;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
width: 38px;
|
height: 38px;
|
background: #fff;
|
}
|
::v-deep .wd-tabs__line {
|
background: #0d867f;
|
}
|
::v-deep .wd-tabs__nav {
|
border-bottom: 1px #dddddd solid;
|
}
|
.tab_bg {
|
background: linear-gradient(0, #ffffff 29%, #f3f9f8 100%);
|
}
|
|
.icon_box {
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
width: 20px;
|
height: 20px;
|
background: #e7f4ec99;
|
border-radius: 50%;
|
}
|
.card_box {
|
height: calc(100vh - 160px);
|
overflow: scroll;
|
}
|
.statistics_box {
|
margin: 15px;
|
}
|
</style>
|