From 2fa9c764993b4a7ad51754d0e8587990f96f1529 Mon Sep 17 00:00:00 2001
From: 曹睿 <360930172@qq.com>
Date: 星期二, 22 四月 2025 16:33:27 +0800
Subject: [PATCH] feat: 完成至扫码

---
 src/pages/production/index.vue |   61 ++++++++++++------------------
 1 files changed, 25 insertions(+), 36 deletions(-)

diff --git a/src/pages/production/index.vue b/src/pages/production/index.vue
index cc33983..16dc0c3 100644
--- a/src/pages/production/index.vue
+++ b/src/pages/production/index.vue
@@ -10,45 +10,37 @@
         </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 v-model="tab" auto-line-width>
+      <wd-tab :title="`寰呯敓浜�(${total.wait})`" class="tab_bg">
+        <ProductList :api="ManageApi.getProductList" state="寰呭畬鎴�" @ok="changeWait" />
+      </wd-tab>
+      <wd-tab :title="`宸茬敓浜�(${total.already})`" class="tab_bg">
+        <ProductList :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 { onMounted, ref } from "vue";
+import ProductList from "./list/index.vue";
+
 const tab = ref<number>(0);
+const total = reactive({
+  wait: 0,
+  already: 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",
-    });
-  }
+const changeWait = (num: number) => {
+  total.wait = num;
 };
+
+const changeAlready = (num: number) => {
+  total.already = num;
+};
+
+onMounted(() => {});
 </script>
 
 <style lang="scss" scoped>
@@ -71,7 +63,7 @@
   border-bottom: 1px #dddddd solid;
 }
 .tab_bg {
-  background: linear-gradient(0, #ffffff 29%, #f3f9f8 100%);
+  background: #f3f9f8;
 }
 
 .icon_box {
@@ -83,10 +75,7 @@
   background: #e7f4ec99;
   border-radius: 50%;
 }
-.card_box {
-  height: calc(100vh - 160px);
-  overflow: scroll;
-}
+
 .statistics_box {
   margin: 15px;
 }

--
Gitblit v1.9.3