| | |
| | | </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 in 10" @click="toDetail" /> |
| | | <wd-loadmore custom-class="loadmore" state="loading" /> |
| | | </view> |
| | | </wd-tab> |
| | | </block> |
| | | <wd-tabs v-model="tab" auto-line-width> |
| | | <wd-tab :title="`待生产(${total.wait})`" class="tab_bg"> |
| | | <ProductList |
| | | ref="waitRef" |
| | | :api="ManageApi.getProductList" |
| | | state="待完成" |
| | | @ok="changeWait" |
| | | /> |
| | | </wd-tab> |
| | | <wd-tab :title="`已生产(${total.already})`" class="tab_bg"> |
| | | <ProductList |
| | | ref="alreadyRef" |
| | | :api="ManageApi.getProductList" |
| | | state="已完成" |
| | | @ok="changeAlready" |
| | | /> |
| | | </wd-tab> |
| | | </wd-tabs> |
| | | </view> |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import ProductCard from "@/components/product_card/index.vue"; |
| | | import Statistics from "./components/Statistics.vue"; |
| | | import ManageApi from "@/api/product/manage"; |
| | | import { ref } from "vue"; |
| | | import ProductList from "./list/index.vue"; |
| | | |
| | | const waitRef = ref(); |
| | | const alreadyRef = ref(); |
| | | const tab = ref<number>(0); |
| | | const total = reactive({ |
| | | wait: 0, |
| | | already: 0, |
| | | }); |
| | | |
| | | const productList = ref<any[]>([ |
| | | { |
| | | label: "待生产(10)", |
| | | }, |
| | | { |
| | | label: "已生产(20)", |
| | | }, |
| | | ]); |
| | | const changeWait = (num: number) => { |
| | | total.wait = num; |
| | | }; |
| | | |
| | | const toDetail = () => { |
| | | uni.navigateTo({ |
| | | url: "/pages/production/detail/wireDetail", |
| | | }); |
| | | const changeAlready = (num: number) => { |
| | | total.already = num; |
| | | }; |
| | | </script> |
| | | |
| | |
| | | border-radius: unset; |
| | | } |
| | | .scan_box { |
| | | padding: 6px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | width: 38px; |
| | | height: 38px; |
| | | padding: 6px; |
| | | background: #fff; |
| | | } |
| | | ::v-deep .wd-tabs__line { |
| | |
| | | border-bottom: 1px #dddddd solid; |
| | | } |
| | | .tab_bg { |
| | | background: linear-gradient(0, #ffffff 29%, #f3f9f8 100%); |
| | | background: #f3f9f8; |
| | | } |
| | | |
| | | .icon_box { |
| | |
| | | background: #e7f4ec99; |
| | | border-radius: 50%; |
| | | } |
| | | .card_box { |
| | | height: calc(100vh - 160px); |
| | | overflow: scroll; |
| | | } |
| | | |
| | | .statistics_box { |
| | | margin: 15px; |
| | | } |