From 79210c2f29c65499e5ff8e4abc0c802b7b1c4065 Mon Sep 17 00:00:00 2001
From: 曹睿 <360930172@qq.com>
Date: 星期四, 24 四月 2025 16:43:07 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/yuanwang-mes-uniapp

---
 src/pages/production/wire/backman/index.vue |   50 +++++++++++++++++++++++++++++++++-----------------
 1 files changed, 33 insertions(+), 17 deletions(-)

diff --git a/src/pages/production/wire/backman/index.vue b/src/pages/production/wire/backman/index.vue
index 17c724d..9def21c 100644
--- a/src/pages/production/wire/backman/index.vue
+++ b/src/pages/production/wire/backman/index.vue
@@ -1,8 +1,10 @@
 <template>
-  <view class="page pt-2">
-    <CardTitle title="鏉傚伐淇℃伅" :hideAction="true" @action="addReport" />
-    <view class="list">
-      <wd-card type="rectangle" custom-class="round">
+  <view class="list">
+    <z-paging ref="pagingRef" v-model="cardList" :fixed="false" @query="getList">
+      <template #top>
+        <CardTitle title="鏉傚伐淇℃伅" :full="false" :hideAction="true" @action="addReport" />
+      </template>
+      <wd-card v-for="(item, index) in cardList" :key="index" type="rectangle" custom-class="round">
         <template #title>
           <view class="flex justify-between">
             <view>
@@ -14,13 +16,13 @@
         </template>
         <ProductionCard :data="cardAttr" color="#0D867F" />
       </wd-card>
-    </view>
+    </z-paging>
     <wd-popup v-model="dialog.visible" position="bottom" custom-class="yl-popup">
       <view class="action px-3">
         <wd-button type="text" @click="cancel">鍙栨秷</wd-button>
         <wd-button type="text" @click="submit">纭畾</wd-button>
       </view>
-      <BackmanForm />
+      <BackmanForm ref="backmanFormRef" />
     </wd-popup>
     <wd-toast />
   </view>
@@ -31,7 +33,11 @@
 import ProductionCard from "../../components/ProductionCard.vue";
 import { useToast } from "wot-design-uni";
 import BackmanForm from "./form.vue";
+import ManageApi from "@/api/product/manage";
 
+const pagingRef = ref();
+const backmanFormRef = ref();
+const paramsId = ref();
 const toast = useToast();
 const dialog = reactive({
   visible: false,
@@ -64,6 +70,8 @@
   },
 ]);
 
+const cardList = ref<any[]>([]);
+
 const toEdit = () => {
   uni.navigateTo({
     url: "/pages/production/wire/backman/edit",
@@ -75,28 +83,36 @@
 };
 
 const submit = () => {
-  toast.show("鎻愪氦");
-  dialog.visible = false;
+  dialog.visible = backmanFormRef.value.submit();
 };
 
 const cancel = () => {
   toast.show("鍙栨秷");
   dialog.visible = false;
 };
+
+const getList = async () => {
+  const { data } = await ManageApi.getBackmanDetail({
+    outPutId: paramsId.value,
+    type: "鎷変笣",
+  });
+  pagingRef.value.complete(data);
+};
+
+onLoad((options: any) => {
+  paramsId.value = options.id;
+});
 </script>
 
 <style lang="scss" scoped>
-.page {
+.list {
+  height: calc(100vh - 120px);
+  padding: 12px;
   background: #f3f9f8;
-  .list {
-    height: calc(100vh - 120px);
-    margin: 12px;
-    overflow: scroll;
 
-    :deep() {
-      .round {
-        border-radius: 4px;
-      }
+  :deep() {
+    .round {
+      border-radius: 4px;
     }
   }
 }

--
Gitblit v1.9.3