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/twist/backman/index.vue | 52 +++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 37 insertions(+), 15 deletions(-) diff --git a/src/pages/production/twist/backman/index.vue b/src/pages/production/twist/backman/index.vue index 2ba997f..428cfc7 100644 --- a/src/pages/production/twist/backman/index.vue +++ b/src/pages/production/twist/backman/index.vue @@ -1,8 +1,16 @@ <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" + :auto-show-back-to-top="true" + @query="getList" + > + <template #top> + <CardTitle title="缁炵嚎鏉傚伐淇℃伅" :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,7 +22,7 @@ </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> @@ -31,12 +39,17 @@ import ProductionCard from "../../components/ProductionCard.vue"; import { useToast } from "wot-design-uni"; import BackmanForm from "./form.vue"; +import { onLoad } from "@dcloudio/uni-app"; +import zPaging from "@/components/z-paging/z-paging.vue"; +import ManageApi from "@/api/product/manage"; +const paramsId = ref(); +const pagingRef = ref(); const toast = useToast(); const dialog = reactive({ visible: false, }); - +const cardList = ref<any[]>([]); const cardAttr = ref<any[]>([ { label: "鍗曚綅", @@ -83,20 +96,29 @@ toast.show("鍙栨秷"); dialog.visible = false; }; + +const getList = async () => { + const { code, data } = await ManageApi.getBackmanDetail({ + wireId: paramsId.value, + }); + if (code == 200) { + pagingRef.value.complete(data); + } +}; +onLoad((options: any) => { + paramsId.value = options.id; +}); </script> <style lang="scss" scoped> -.page { +.list { + height: calc(100vh - 80px); + 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