From 1187936c713bae2ad43063900c7bee80502e091d Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 19 十一月 2025 17:06:42 +0800
Subject: [PATCH] fix: 重构拉丝报工

---
 src/pages/production/list/index.vue |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/pages/production/list/index.vue b/src/pages/production/list/index.vue
index 92862f8..bd6f0e4 100644
--- a/src/pages/production/list/index.vue
+++ b/src/pages/production/list/index.vue
@@ -36,10 +36,13 @@
 const map = reactive({
   deviceModel: "deviceModel",
   model: "model",
+  systemNo: "systemNo",
   totalAmount: "totalAmount",
   amount: "amount",
   unAmount: "unAmount",
   unit: "unit",
+  poleModel: "poleModel",
+  contractNo: "contractNo",
 });
 const props = defineProps({
   api: {
@@ -50,13 +53,17 @@
     type: String,
     default: "",
   },
+  search: {
+    type: String,
+    default: "",
+  },
 });
 
 const emits = defineEmits(["ok"]);
 const list = ref<any[]>([]);
 
 const toDetail = (id: number, type: string) => {
-  toast.show("鐐瑰嚮鍗$墖");
+  // toast.show("鐐瑰嚮鍗$墖");
   if (type == "鎷変笣") {
     uni.navigateTo({
       url: `/pages/production/detail/wireDetail?id=${id}`,
@@ -69,25 +76,33 @@
 };
 
 const getList = async (pageNo: number, pageSize: number) => {
-  const { code, data } = await props.api({
+  const params: any = {
     userName: userInfo.value.userName,
     state: props.state,
     current: pageNo,
     size: pageSize,
-  });
+  };
+  if (props.search) {
+    params.search = props.search;
+  }
+  const { code, data } = await props.api(params);
   if (code == 200) {
     if (data.type == "缁炵嚎") {
       map.deviceModel = "deviceModel";
       map.model = "model";
+      map.systemNo = "systemNo";
       map.totalAmount = "totalLength";
       map.amount = "length";
       map.unAmount = "unLength";
     } else if (data.type == "鎷変笣") {
       map.deviceModel = "deviceModel";
       map.model = "model";
+      map.systemNo = "systemNo";
       map.totalAmount = "totalAmount";
       map.amount = "amount";
       map.unAmount = "unAmount";
+      map.poleModel = "poleModel";
+      map.contractNo = "contractNo";
     }
     if (data.data.total == 0) {
       pagingRef.value.complete(true);

--
Gitblit v1.9.3